
#14691: Replace EvTerm with CoreExpr -------------------------------------+------------------------------------- Reporter: nomeata | Owner: (none) Type: task | Status: new Priority: normal | Milestone: Component: Compiler (Type | Version: 8.3 checker) | Resolution: | Keywords: 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 nomeata): Ok, here is (part of) the deal: * `tcLookupGlobal :: Name -> TcM TyThing` looks things up in the global environment (`getGblEnv`). While compiling `Data.Typeable.Internal`, `mkTrCon` is not in the global environment. * If the lookup fails, it uses `notFound`, which, for some reason, prints the `tcl_env` of the *local* environment (`lcl_env <- getLclEnv`). * This shows us that `mkTrCon` is actually in the local environment! So presumably, we just have to use that. I would have expected that `tcLookup :: Name -> TcM TcTyThing` (no `Global` in the name) would consult the local environment. It seems to consult the local type environment (`local_env <- getLclTypeEnv`). But when I tried that (in http://git.haskell.org/ghc.git/commitdiff/cb7deb6d0f36132594ccad3c86bddc7d7c...) it somehow did not help. Will have to try harder, I guess. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14691#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler