[project @ 2002-03-28 17:52:08 by simonmar]
authorsimonmar <unknown>
Thu, 28 Mar 2002 17:52:08 +0000 (17:52 +0000)
committersimonmar <unknown>
Thu, 28 Mar 2002 17:52:08 +0000 (17:52 +0000)
In lookupTopBndrRn, if we're in an interface file, then create the
binder in the cache with the correct Module (inc. package name) rather
than making a vanilla module as we do currently.

This helps to get the package names right in names from interfaces
that we've read via checkOldIface (ie. "skipped" modules), and fixes a
bug to do with unnecessary version bumping and recompilation.

(Simon P.J. will add a better comment later)

MERGE TO STABLE

ghc/compiler/rename/RnEnv.lhs

index 4ff1427..15eed1d 100644 (file)
@@ -216,7 +216,7 @@ lookupTopBndrRn rdr_name
   | otherwise
   = getModeRn  `thenRn` \ mode ->
     if isInterfaceMode mode
-       then lookupIfaceName rdr_name   
+       then lookupSysBinder rdr_name   
     else 
     getModuleRn                `thenRn` \ mod ->
     getGlobalNameEnv   `thenRn` \ global_env ->