
#14873: GHC HEAD regression (piResultTy) -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: merge Priority: highest | Milestone: 8.6.1 Component: Compiler (Type | Version: 8.5 checker) | Resolution: | Keywords: TypeInType Operating System: Unknown/Multiple | Architecture: Type of failure: Compile-time | Unknown/Multiple crash or panic | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): Richard, I'm beginning to wonder if the pain of `Note [The well-kinded type invariant]` is worth the gain. It's all very delicate. Here's a possible alternative 1. Define `tcTypeKind :: TcType -> TcM TcKind` which zonks, if necessary, on the fly. This would be dead easy to write. 2. Call `tcTypeKind` instead of `typeKind` in ... well, in various places. Anywhere in the type checker where un-zonked kinds might be floating about. For (2) there are two difficulties * Which calls, exactly, would need to be in the monad? * Are there any calls that don't have the `TcM` monad conveniently to hand? For example `eqType` calls `typeKind`, so we'd really need a `tcEqType` variant that calls `tcTypeKind`. Advantages: (a) redundant Refls disappear much earlier; this is Good (b) less delicate invariants. What do you think? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14873#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler