[project @ 1999-12-09 12:30:56 by simonpj]
[ghc-hetmet.git] / ghc / compiler / rename / RnMonad.lhs
index 5fe5d08..99cc716 100644 (file)
@@ -20,7 +20,9 @@ module RnMonad(
 
 #include "HsVersions.h"
 
-#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 302
+#if   defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 405
+import IOExts          ( fixIO )
+#elif defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 302
 import PrelIOBase      ( fixIO )       -- Should be in GlaExts
 #else
 import IOBase          ( fixIO )
@@ -44,7 +46,7 @@ import Module         ( Module, ModuleName, ModuleHiMap, SearchPath, WhereFrom,
                        )
 import NameSet         
 import RdrName         ( RdrName, dummyRdrVarName, rdrNameOcc )
-import CmdLineOpts     ( opt_D_dump_rn_trace, opt_IgnoreIfacePragmas, opt_HiMap )
+import CmdLineOpts     ( opt_D_dump_rn_trace, opt_HiMap )
 import PrelInfo                ( builtinNames )
 import TysWiredIn      ( boolTyCon )
 import SrcLoc          ( SrcLoc, mkGeneratedSrcLoc )
@@ -216,7 +218,10 @@ type RnNameSupply
 
 
 --------------------------------
-data ExportEnv   = ExportEnv Avails Fixities
+data ExportEnv   = ExportEnv Avails Fixities [ModuleName]
+                       -- The list of modules is the modules exported
+                       -- with 'module M' in the export list
+
 type Avails      = [AvailInfo]
 type Fixities    = [(Name, Fixity)]
 
@@ -285,7 +290,7 @@ type InterfaceDetails = (WhetherHasOrphans,
 
 -- needed by Main to fish out the fixities assoc list.
 getIfaceFixities :: InterfaceDetails -> Fixities
-getIfaceFixities (_, _, ExportEnv _ fs) = fs
+getIfaceFixities (_, _, ExportEnv _ fs _) = fs
 
 
 type RdrNamePragma = ()                                -- Fudge for now
@@ -451,7 +456,9 @@ renameSourceCode mod_name name_supply m
        let
            rn_down = RnDown { rn_loc = mkGeneratedSrcLoc, rn_ns = names_var,
                               rn_errs = errs_var, rn_hi_maps = himaps,
-                              rn_mod = mod_name }
+                              rn_mod = mod_name, 
+                              rn_ifaces = panic "rnameSourceCode: rn_ifaces"  -- Not required
+                            }
            s_down = SDown { rn_mode = InterfaceMode,
                               -- So that we can refer to PrelBase.True etc
                             rn_genv = emptyRdrEnv, rn_lenv = emptyRdrEnv,