[GHC] #11648: assertPprPanic, called at compiler/types/TyCoRep.hs:1932
GHC
ghc-devs at haskell.org
Tue Mar 15 14:44:39 UTC 2016
#11648: assertPprPanic, called at compiler/types/TyCoRep.hs:1932
-------------------------------------+-------------------------------------
Reporter: thomie | Owner: goldfire
Type: bug | Status: merge
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:
| polykinds/T11648{,b}
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by goldfire):
A few comments for posterity on the commit above:
A lot of the changes are due to moving decisions out from kcHsTyVarBndrs,
and thus the need to store information in the AST:
- It turned out to be more convenient to decide if a data decl has a CUSK
in the renamed than on the fly. (It could be done on the fly, but it would
have been a bit hairy and duplicated code in the renamer.) See the new bit
in the manual for a description of what's going on here.
- There also needed to be a decision about whether to use `Anon` or
`Named` when building the `TcTyBinder`s of a tycon's kind. Previous to
this patch, this was done in `kcHsTyVarBndrs`, but -- as Simon pointed out
to me -- this was bogus (it looked at the free variables of a not-yet-
solved-or-zonked type). So it's now done via a simple syntactic check in
the renamer. But then the result of the check must be put in the AST,
causing knock-on changes. See `Note [Dependent LHsQTyVars]` in !TcHsType
and also a new bit in the manual.
- One of this issues brought up in the ticket is the handling of CUSKs for
associated type families. An associated type/data family's CUSKness must
be inherited from the enclosing class. Previously, all associated families
had CUSKs, but this was wrong. So the CUSK check is a bit more intricate
to allow for this relationship.
- Along the way, I made `(->)`, when used in a kind, have type `* -> * ->
*`, instead of being polymorphic in `RuntimeRep`s. We don't have type-
level representation polymorphism.
- Also incidental to this patch, I made kind variables have kind `*` when
`-XTypeInType` is not in effect. Not doing this earlier was an oversight.
The check isn't perfect, as it's sometimes hard to tell what's a kind
variable and what isn't; currently, only variables used in kinds in tycon
`LHsQTyVars` are affected, and these are surely kind variables. (This is
`mk_kv_kinds` in `kcHsTyVarBndrs`.)
- There is a new function `anonymiseTyBinders`. This was necessary in an
earlier version of this patch but is now redundant (and harmless). I will
remove.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11648#comment:22>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list