[GHC] #13761: Can't create poly-kinded GADT with TypeInType enabled, but can without

GHC ghc-devs at haskell.org
Tue May 30 13:37:29 UTC 2017


#13761: Can't create poly-kinded GADT with TypeInType enabled, but can without
-------------------------------------+-------------------------------------
        Reporter:  RyanGlScott       |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler (Type    |              Version:  8.0.1
  checker)                           |
      Resolution:                    |             Keywords:  TypeInType
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:                    |
-------------------------------------+-------------------------------------

Comment (by RyanGlScott):

 Replying to [comment:2 goldfire]:
 > This behavior is all expected... or, in one case, not unexpected.
 >
 > The very first example in the OP is regrettable, but it is "not
 unexpected", as `-XNoTypeInType` rejects such programs on a best-effort
 basis. That one is hard.
 >
 > The other examples are all consequences of
 [https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
 #complete-user-supplied-kind-signatures-and-polymorphic-recursion the CUSK
 rules].

 Thanks for the link. I'm a bit embarrassed to say I didn't think to look
 in the users' guide to see if CUSKs were documented, but I'm glad they
 are!

 > Proposed solution: allow top-level kind signatures of type-level
 declarations (just like we have top-level type signatures of term-level
 declarations) and deprecate CUSKs. One Of These Days, I will write a ghc-
 proposal for this.

 If I may ask, what do you mean by "top-level kind signature" here? I
 thought that

 {{{#!hs
 data T :: forall k. k -> Type
 }}}

 //was// a top-level kind signature, but perhaps you meant something
 different?

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


More information about the ghc-tickets mailing list