Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,836
    • Issues 4,836
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 459
    • Merge requests 459
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #11463

Closed
Open
Created Jan 20, 2016 by Ryan Scott@RyanGlScottMaintainer

Template Haskell applies too many arguments to kind synonym

Running the following code:

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeInType #-}
module IdStarK where

import Data.Kind
import Language.Haskell.TH

type Id a = a
data Proxy (a :: Id k) = Proxy

$(return [])

main :: IO ()
main = do
  putStrLn $(reify ''Proxy >>= stringE . pprint)
  putStrLn $(reify ''Proxy >>= stringE . show)

Gives a result I wouldn't have expected:

$ /opt/ghc/head/bin/runghc IdStarK.hs 
data IdStarK.Proxy (a_0 :: IdStarK.Id * k_1) = IdStarK.Proxy
TyConI (DataD [] IdStarK.Proxy [KindedTV a_1627394516 (AppT (AppT (ConT IdStarK.Id) StarT) (VarT k_1627394515))] Nothing [NormalC IdStarK.Proxy []] [])

From the output, it appears that Id is being applied to two arguments, both * and k! Perhaps this indirectly (or directly) a consequence of #11376 (closed)?

Trac metadata
Trac field Value
Version 8.0.1-rc1
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Template Haskell
Test case
Differential revisions
BlockedBy
Related #11376 (closed)
Blocking
CC goldfire
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking