#6159: unexpected GADT kind error
---------------------------------------+------------------------------------
Reporter: kosmikus | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.5 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC rejects valid program | Testcase:
Blockedby: | Blocking:
Related: |
---------------------------------------+------------------------------------
I am surprised that the following two declarations are treated differently
in HEAD (7.5.20120607):
{{{
{-# LANGUAGE GADTs, KindSignatures #-}
-- ok
data X f ix where
X :: f ix -> X f ix
-- not ok
data Y f :: * -> * where
Y :: f ix -> Y f ix
}}}
The second version causes an error:
{{{
/home/andres/trans/BugTest.hs:7:18:
Expecting one more argument to `f'
In the type `Y f ix'
In the definition of data constructor `Y'
In the data declaration for `Y'
}}}
I'd expect both to work.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6159>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs