[project @ 2001-12-06 10:45:42 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / HscTypes.lhs
index 5887e07..5bd9e16 100644 (file)
@@ -32,7 +32,8 @@ module HscTypes (
        PersistentRenamerState(..), IsBootInterface, DeclsMap,
        IfaceInsts, IfaceRules, GatedDecl, GatedDecls, GateFn, IsExported,
        NameSupply(..), OrigNameCache, OrigIParamCache,
-       Avails, AvailEnv, GenAvailInfo(..), AvailInfo, RdrAvailInfo, 
+       Avails, AvailEnv, emptyAvailEnv,
+       GenAvailInfo(..), AvailInfo, RdrAvailInfo, 
        PersistentCompilerState(..),
 
        Deprecations(..), lookupDeprec,
@@ -52,7 +53,8 @@ module HscTypes (
 
 #include "HsVersions.h"
 
-import RdrName         ( RdrNameEnv, addListToRdrEnv, emptyRdrEnv, mkRdrUnqual, rdrEnvToList )
+import RdrName         ( RdrName, RdrNameEnv, addListToRdrEnv, emptyRdrEnv, 
+                         mkRdrUnqual, rdrEnvToList )
 import Name            ( Name, NamedThing, getName, nameOccName, nameModule, nameSrcLoc )
 import NameEnv
 import OccName         ( OccName )
@@ -67,7 +69,7 @@ import Class          ( Class, classSelIds )
 import TyCon           ( TyCon, isNewTyCon, tyConGenIds, tyConSelIds, tyConDataConsIfAvailable )
 import DataCon         ( dataConId, dataConWrapId )
 
-import BasicTypes      ( Version, initialVersion, Fixity )
+import BasicTypes      ( Version, initialVersion, Fixity, IPName )
 
 import HsSyn           ( DeprecTxt, tyClDeclName, ifaceRuleDeclName )
 import RdrHsSyn                ( RdrNameInstDecl, RdrNameRuleDecl, RdrNameTyClDecl )
@@ -443,7 +445,10 @@ data GenAvailInfo name     = Avail name     -- An ordinary identifier
                        deriving( Eq )
                        -- Equality used when deciding if the interface has changed
 
-type AvailEnv    = NameEnv AvailInfo   -- Maps a Name to the AvailInfo that contains it
+type AvailEnv = NameEnv AvailInfo      -- Maps a Name to the AvailInfo that contains it
+
+emptyAvailEnv :: AvailEnv
+emptyAvailEnv = emptyNameEnv
                                
 instance Outputable n => Outputable (GenAvailInfo n) where
    ppr = pprAvail
@@ -585,7 +590,7 @@ data NameSupply
    }
 
 type OrigNameCache   = FiniteMap (ModuleName,OccName) Name
-type OrigIParamCache = FiniteMap OccName Name
+type OrigIParamCache = FiniteMap (IPName RdrName) (IPName Name)
 \end{code}
 
 @ImportedModuleInfo@ contains info ONLY about modules that have not yet