From: simonpj Date: Mon, 1 Apr 2002 09:24:29 +0000 (+0000) Subject: [project @ 2002-04-01 09:24:29 by simonpj] X-Git-Tag: Approx_11550_changesets_converted~2196 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6c2e88180f38fa1448338316a15a69bea8a4ecbd;p=ghc-hetmet.git [project @ 2002-04-01 09:24:29 by simonpj] Comments --- diff --git a/ghc/compiler/rename/RnEnv.lhs b/ghc/compiler/rename/RnEnv.lhs index 15eed1d..8ccf276 100644 --- a/ghc/compiler/rename/RnEnv.lhs +++ b/ghc/compiler/rename/RnEnv.lhs @@ -217,6 +217,13 @@ lookupTopBndrRn rdr_name = getModeRn `thenRn` \ mode -> if isInterfaceMode mode then lookupSysBinder rdr_name + -- lookupSysBinder uses the Module in the monad to set + -- the correct module for the binder. This is important because + -- when GHCi is reading in an old interface, it just sucks it + -- in entire (Rename.loadHomeDecls) which uses lookupTopBndrRn + -- rather than via the iface file cache which uses newTopBndrRn + -- We must get the correct Module into the thing. + else getModuleRn `thenRn` \ mod -> getGlobalNameEnv `thenRn` \ global_env ->