
#16391: "Quantified type's kind mentions quantified type variable" error with fancy-kinded GADT -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.6.3 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 simonpj): The other bad thing is that the error message is a mess, becuase it mentions 'a' in one place and 'a1' in the other. Very confusing. Reason: {{{ (forAllEscapeErr env' ty tau_kind) }}} we pass `env'` (the result of tidying tvs) to `forAllEscapeErr`, which then prints `ty` in this tidy-env, thereby tidying the same tyvars again. This would not be hard to clear up, perhpas not by printing `ty` afresh, but by passing `tvs'` and `phi` to `forAllEscapeErr`, and printing the foralls manually, as it were. Does that make sense? Also I wonder if if might be easier to understand if we said {{{ • Quantified type's kind mentions quantified type variable type: forall a1. T where the body of the forall has this kind T :: Const * a }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16391#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler