
#11310: Surprising accepted constructor for GADT instance of data family -------------------------------------+------------------------------------- Reporter: dfeuer | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- {{{#!hs -- Accepted: data family Foo (x :: *) :: * -> * data instance Foo Int Char where Foo :: Foo Int Char -- Not accepted data Bar Char where Bar :: Bar Char }}} It seems the second example, using a simple GADT, is syntactically barred from having a specific type constructor in its "head". That syntactic restriction is relaxed, however, for ''all'' arguments of the data instance, even though I'd expect it only for the first argument. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11310 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler