
#14795: Data type return kinds don't obey the forall-or-nothing rule -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 (Type checker) | Keywords: TypeInType | Operating System: Unknown/Multiple Architecture: | Type of failure: GHC accepts Unknown/Multiple | invalid program Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Originally noticed [https://github.com/ghc-proposals/ghc- proposals/pull/103#issuecomment-364562974 here]. GHC accepts this: {{{#!hs {-# LANGUAGE GADTs #-} {-# LANGUAGE RankNTypes #-} {-# LANGUAGE TypeInType #-} import Data.Kind data Foo :: forall a. a -> b -> Type where MkFoo :: a -> Foo a b }}} Despite the fact that `Foo`'s return kind is headed by an explicit `forall` which does not quantify `b`. The users' guide doesn't explicitly indicate that the `forall`-or-nothing rule should apply to data type return kinds, but goldfirere believes that not doing so is an [https://github.com/ghc-proposals/ghc- proposals/pull/103#issuecomment-364670215 inconsistent design], so I'm opening this ticket to track this. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14795 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler