
#14121: ghc master requires -XTypeInType where 8.2.1 does not -------------------------------------+------------------------------------- Reporter: duog | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler (Type | Version: 8.3 checker) | Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => invalid Comment: This program should indeed require `TypeInType`, and the fact that it is accepted without `TypeInType` in 8.2.1 is a fluke. The ability to bind a kind variable and use it as the kind of a different type variable in the same telescope is something that wasn't possible in a pre-`TypeInType` GHC, as this error message in GHC 7.10.3 reveals: {{{ GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help λ> :set -XKindSignatures -XRankNTypes -XPolyKinds λ> import Data.Proxy λ> let f :: forall (k :: *). forall (a :: k). Proxy a; f = Proxy <interactive>:4:10: Kind variable also used as type variable: ‘k’ In the type signature for ‘f’ }}} `RuntimeRep` wasn't introduced until 8.0, so I can't test your exact example in 7.10.3. But the principle is the same: if you use something as both type and kind, then you need `TypeInType`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14121#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler