
#11648: assertPprPanic, called at compiler/types/TyCoRep.hs:1932 -------------------------------------+------------------------------------- Reporter: thomie | Owner: goldfire Type: bug | Status: new Priority: highest | Milestone: 8.0.1 Component: Compiler | Version: 8.1 Resolution: | Keywords: TypeInType 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 goldfire): Ah -- so the meta-tyvars aren't making it to the real `TyCon`, only the `TcTyCon`? It's quite normal for `TcTyCon`s to have meta-tyvars. (Indeed, that's what they're for.) But I'm missing some context. The ASSERT that's breaking is the check during substitutions. But which substitution? I don't see an obvious substitution in `getFamDeclInitialKind`. To be clear, I think there are two related problems going on: 1. The CUSK check is inaccurate in the presence of `TypeInType`, because implicitly-bound kind variables (like `k` in `data Proxy (a :: k)`) can have non-trivial types. 2. The code in !TcTyClsDecls is tripping over CUSK types that aren't actually CUSKs. I propose to fully defer (1). It can be triggered only with `TypeInType` enabled and has some thorny design issues. And when it goes wrong, it won't be catastrophic (i.e., no panicking, segfaulting, or launching rockets, just an unexpected -- but still sound -- result of type inference). (2) is the real issue at hand. And, currently without the ability to test, I don't fully understand what's going wrong. I hope to be out of my intermediate state today or tomorrow. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11648#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler