
#15791: typeKind confuses Type and Constraint -------------------------------------+------------------------------------- Reporter: goldfire | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.6.1 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): I tried this, but got stuck here, in `GHC.Err`: {{{ undefined :: forall (r :: RuntimeRep). forall (a :: TYPE r). HasCallStack => a }}} What is the kind of `undefined`'s type? With `typeKind` we get `Type`. But with `tcTypeKind` we dive into the body of the `=>`, and take the kind of `a`; but alas that mentions the universally quantified `r`, so we get a panic. And indeed the type `forall r (a::TYPE r). a` is indeed ill-formed. But with the `HasCallStack` it is actually fine. What to do? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15791#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler