[GHC] #5937: Kind variables not allowed in data declaration kind annotation
GHC
cvs-ghc at haskell.org
Tue Mar 13 19:14:34 CET 2012
#5937: Kind variables not allowed in data declaration kind annotation
---------------------------------------+------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler (Type checker)
Version: 7.5 | Keywords: PolyKinds
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------------+------------------------------------
GHC won't accept kind variables stated directly in a data declaration. For
example, the following does not compile:
{{{
data SMaybe :: (k -> *) -> Maybe k -> * where
SNothing :: SMaybe s 'Nothing
SJust :: s a -> SMaybe s ('Just a)
}}}
However, the following does compile:
{{{
data SMaybe' (s :: k -> *) (m :: Maybe k) where
SNothing' :: SMaybe' s 'Nothing
SJust' :: s a -> SMaybe' s ('Just a)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5937>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list