[project @ 2000-10-16 15:16:59 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / HscTypes.lhs
index 05f39e5..9ebbbee 100644 (file)
@@ -12,16 +12,17 @@ module HscTypes (
 
        WhetherHasOrphans, ImportVersion, ExportItem,
        PersistentRenamerState(..), IsBootInterface, Avails, DeclsMap,
-       IfaceInsts, IfaceRules, DeprecationEnv, OrigNameEnv, AvailEnv,
+       IfaceInsts, IfaceRules, DeprecationEnv, OrigNameEnv, 
+       AvailEnv, AvailInfo, GenAvailInfo(..),
        PersistentCompilerState(..),
 
        InstEnv, 
 
-       GlobalRdrEnv,
+       GlobalRdrEnv, RdrAvailInfo,
 
        -- Provenance
        Provenance(..), ImportReason(..), PrintUnqualified,
-        pprProvenance, hasBetterProv
+        pprNameProvenance, hasBetterProv
 
     ) where
 
@@ -393,16 +394,16 @@ data CompResult
 -- generate Linkables.
 
 data HscResult
-   = HscOK   ModDetails                -- new details (HomeSymbolTable additions)
-            (Maybe ModIFace)           -- new iface (if any compilation was done)
-            (Maybe String)             -- generated stub_h
-            (Maybe String)             -- generated stub_c
-             PersistentCompilerState   -- updated PCS
-             [SDoc]                    -- warnings
+   = HscOK   ModDetails             -- new details (HomeSymbolTable additions)
+            (Maybe ModIFace)        -- new iface (if any compilation was done)
+            (Maybe String)          -- generated stub_h filename (in /tmp)
+            (Maybe String)          -- generated stub_c filename (in /tmp)
+             PersistentCompilerState -- updated PCS
+             [SDoc]                  -- warnings
 
-   | HscErrs PersistentCompilerState   -- updated PCS
-             [SDoc]                    -- errors
-             [SDoc]                    -- warnings
+   | HscErrs PersistentCompilerState -- updated PCS
+             [SDoc]                  -- errors
+             [SDoc]                  -- warnings
 
        
 -- These two are only here to avoid recursion between CmCompile and
@@ -480,9 +481,9 @@ hasBetterProv (NonLocalDef (UserImport _ _ True) _) _                                  = True
 hasBetterProv (NonLocalDef (UserImport _ _ _   ) _) (NonLocalDef ImplicitImport _) = True
 hasBetterProv _                                            _                              = False
 
-pprProvenance :: Name -> Provenance -> SDoc
-pprProvenance name LocalDef           = ptext SLIT("defined at") <+> ppr (nameSrcLoc name)
-pprProvenance name (NonLocalDef why _) = sep [ppr_reason why, 
+pprNameProvenance :: Name -> Provenance -> SDoc
+pprNameProvenance name LocalDef               = ptext SLIT("defined at") <+> ppr (nameSrcLoc name)
+pprNameProvenance name (NonLocalDef why _) = sep [ppr_reason why, 
                                              nest 2 (parens (ppr_defn (nameSrcLoc name)))]
 
 ppr_reason ImplicitImport        = ptext SLIT("implicitly imported")