From 6c2e88180f38fa1448338316a15a69bea8a4ecbd Mon Sep 17 00:00:00 2001 From: simonpj Date: Mon, 1 Apr 2002 09:24:29 +0000 Subject: [PATCH] [project @ 2002-04-01 09:24:29 by simonpj] Comments --- ghc/compiler/rename/RnEnv.lhs | 7 +++++++ 1 file changed, 7 insertions(+) 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 -> -- 1.7.10.4