[GHC] #11554: Self quantification in GADT data declarations

GHC ghc-devs at haskell.org
Sun Feb 7 18:33:00 UTC 2016


#11554: Self quantification in GADT data declarations
-------------------------------------+-------------------------------------
           Reporter:  Rafbill        |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  8.0.1-rc2
           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:
-------------------------------------+-------------------------------------
 GHC hangs on this (it was panicking on the same code before :
 [https://github.com/goldfirere/ghc/issues/56](https://github.com/goldfirere/ghc/issues/56)
 :
 {{{#!hs
 {-# LANGUAGE GADTs, TypeInType #-}
 import Data.Kind
 data A :: Type where
   B :: forall (a :: A). A
 }}}

 I guess the typechecker tries to infer the kind of A from the type of the
 constructors and hangs. Maybe recursive occurrences of a type as a kind in
 its constructors should only be allowed when its kind signature is
 specified and can be used to typecheck the constructors.

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


More information about the ghc-tickets mailing list