
#14873: GHC HEAD regression (piResultTy) -------------------------------------+------------------------------------- Reporter: RyanGlScott | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 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 goldfire): I think we need these invariants: 1. If `ty <- tc_hs_type ... exp_kind`, then `typeKind ty == exp_kind`. 2. If `(ty, ki) <- tc_infer_hs_type ...`, then `typeKind ty == ki`. 3. If `(ty, ki) <- tc_infer_hs_type ...`, then `zonk ki == ki`. 4. If `(ty, ki) <- tcTyVar ...`, then `typeKind ty == ki`. 5. If `(ty, ki) <- tcTyVar ...`, then `zonk ki == ki`. All of these appear to be true now, except I'm worried about the `tcTyVar` case for `TcTyCon`s -- I ''think'' `TcTyCon` kinds can have unzonked metavariables, if the `TcTyCon` comes from the non-CUSK case in `kcLHsQTyVars`. Do you also think this is possible? If so, we need to zonk the kind and wrap the (knot-tied) type in a reflexive coercion (with `mkNakedCastTy`) to fix its kind. Do you agree? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14873#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler