diff options
| author | simonmar <unknown> | 2001-03-01 14:26:01 +0000 |
|---|---|---|
| committer | simonmar <unknown> | 2001-03-01 14:26:01 +0000 |
| commit | 18b24e64d6a9e3011a2437cec87ef09ad3e6f900 (patch) | |
| tree | e0841079a2a21aa940cd09ce1b37941864f0c616 /ghc/compiler/rename/Rename.lhs | |
| parent | 6ae3188bfc73775a857ecf600a8c16408cb2cadf (diff) | |
| download | haskell-18b24e64d6a9e3011a2437cec87ef09ad3e6f900.tar.gz | |
[project @ 2001-03-01 14:26:00 by simonmar]
GHCi fixes:
- expressions are now compiled in a pseudo-module "$Interactive",
which avoids some problems with storage of demand-loaded declarations.
- compilation manager now detects when it needs to read the interace
for a module, even if it is already compiled. GHCi never demand-loads
interfaces now.
- (from Simon PJ) fix a problem with the recompilation checker, which
meant that modules were sometimes not recompiled when they should
have been.
- ByteCodeGen/Link: move linker related stuff into ByteCodeLink.
Diffstat (limited to 'ghc/compiler/rename/Rename.lhs')
| -rw-r--r-- | ghc/compiler/rename/Rename.lhs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ghc/compiler/rename/Rename.lhs b/ghc/compiler/rename/Rename.lhs index 8e6a7d7c88..1972ae238a 100644 --- a/ghc/compiler/rename/Rename.lhs +++ b/ghc/compiler/rename/Rename.lhs @@ -30,6 +30,7 @@ import RnIfaces ( slurpImpDecls, mkImportInfo, recordLocalSlurps, import RnHiFiles ( readIface, removeContext, loadInterface, loadExports, loadFixDecls, loadDeprecs, ) +import MkIface ( pprUsage ) import RnEnv ( availsToNameSet, mkIfaceGlobalRdrEnv, emptyAvailEnv, unitAvailEnv, availEnvElts, plusAvailEnv, groupAvails, warnUnusedImports, @@ -97,7 +98,8 @@ renameModule dflags hit hst pcs this_module rdr_module renameStmt :: DynFlags -> HomeIfaceTable -> HomeSymbolTable -> PersistentCompilerState - -> Module -- current context (module) + -> Module -- current context (scope to compile in) + -> Module -- current module -> LocalRdrEnv -- current context (temp bindings) -> RdrNameStmt -- parsed stmt -> IO ( PersistentCompilerState, @@ -105,13 +107,13 @@ renameStmt :: DynFlags Maybe ([Name], (SyntaxMap, RenamedStmt, [RenamedHsDecl])) ) -renameStmt dflags hit hst pcs this_module local_env stmt +renameStmt dflags hit hst pcs scope_module this_module local_env stmt = renameSource dflags hit hst pcs this_module $ -- Load the interface for the context module, so -- that we can get its top-level lexical environment -- Bale out if we fail to do this - loadInterface doc (moduleName this_module) ImportByUser `thenRn` \ iface -> + loadInterface doc (moduleName scope_module) ImportByUser `thenRn` \ iface -> let rdr_env = mi_globals iface print_unqual = unQualInScope rdr_env in @@ -245,6 +247,7 @@ rename this_module contents@(HsModule _ _ exports imports local_decls mod_deprec -- GENERATE THE VERSION/USAGE INFO mkImportInfo mod_name imports `thenRn` \ my_usages -> + traceHiDiffsRn (vcat (map pprUsage my_usages)) `thenRn_` -- BUILD THE MODULE INTERFACE let |
