
#14207: Levity polymorphic GADT requires extra type signatures -------------------------------------+------------------------------------- Reporter: andrewthad | Owner: (none) Type: bug | Status: new Priority: low | Milestone: Component: Compiler | Version: 8.2.1 Keywords: | Operating System: Unknown/Multiple LevityPolymorphism | Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- This does not compile: {{{#!hs data Foo s (a :: TYPE k) where FooC :: Foo s Int# }}} However, this does: {{{#!hs data Foo (s :: Type) (a :: TYPE k) where FooC :: Foo s Int# }}} This also works: {{{#!hs data Foo (s :: j) (a :: TYPE k) where FooC :: Foo s Int# }}} These are all of the language pragmas I have enabled: {{{#!hs {-# LANGUAGE MultiParamTypeClasses #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeOperators #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeInType #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE UnboxedSums #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE MagicHash #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-} }}} This is pretty easy to work around, but I think it's an incorrect behavior. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14207 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler