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

GHC ghc-devs at haskell.org
Tue May 30 13:30:41 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 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].

 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.

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


More information about the ghc-tickets mailing list