
#10782: Existential variables not scoped? -------------------------------------+------------------------------------- Reporter: goldfire | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.11 (Type checker) | Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- 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? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10782 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler