Existential variables not scoped?
I was looking into scoping of type variables, and it looks to me that type-checking the introduction of existentials (that is, checking a GADT pattern-match) doesn't extend the type environment. I doubt there's any way to tickle this bug. But the existential skolems don't seem to be added to the tcl_tyvars
field of the TcLclEnv
, which means that inner quantification, should uniques collide(!), might do the wrong thing in quantifyTyVars
.
To be clear, I don't wish the variables actually to scope in Haskell source, just for GHC to remember that the internal variables are in scope, to return from tcGetGlobalTyVars
.
Is my analysis wrong somewhere? Do we just assume that uniques being unique will take care of this?
Trac metadata
Trac field | Value |
---|---|
Version | 7.11 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler (Type checker) |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |