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
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
Is my analysis wrong somewhere? Do we just assume that uniques being unique will take care of this?
|Component||Compiler (Type checker)|