[GHC] #13391: PolyKinds is more permissive in GHC 8

GHC ghc-devs at haskell.org
Tue Mar 7 20:15:37 UTC 2017


#13391: PolyKinds is more permissive in GHC 8
-------------------------------------+-------------------------------------
           Reporter:  crockeea       |             Owner:  (none)
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.2
           Keywords:                 |  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:
-------------------------------------+-------------------------------------
 The docs claim that the definition in section 9.11.10

 {{{
 data G (a :: k) where
   GInt   :: G Int
   GMaybe :: G Maybe
 }}}

 "requires that `-XTypeInType` be in effect", but this isn't the case.

 The following compiles with GHC-8.0.2:

 {{{

 {-# LANGUAGE PolyKinds, GADTs #-}

 data G (a :: k) where
   GInt   :: G Int
   GMaybe :: G Maybe
 }}}

 The example does *not* compile with 7.10.3, so this seems to be a case
 where `-XPolyKinds` has become more permissive in GHC 8 (as outlined in
 section 9.11.1).

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13391>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list