[project @ 2000-10-26 07:19:52 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / HscTypes.lhs
index 9150218..9550ac6 100644 (file)
@@ -126,7 +126,7 @@ data ModIface
                                                -- (changing usages doesn't affect the version of
                                                --  this module)
 
-        mi_exports  :: Avails,                 -- What it exports
+        mi_exports  :: [(ModuleName,Avails)],  -- What it exports
                                                -- Kept sorted by (mod,occ),
                                                -- to make version comparisons easier
 
@@ -293,16 +293,19 @@ initialVersionInfo = VersionInfo { vers_module  = initialVersion,
                                   vers_decls   = emptyNameEnv }
 
 data Deprecations = NoDeprecs
-                 | DeprecAll DeprecTxt                 -- Whole module deprecated
-                 | DeprecSome (NameEnv DeprecTxt)      -- Some things deprecated
-                                                       -- Just "big" names
+                 | DeprecAll DeprecTxt                         -- Whole module deprecated
+                 | DeprecSome (NameEnv (Name,DeprecTxt))       -- Some things deprecated
+                                                               -- Just "big" names
+               -- We keep the Name in the range, so we can print them out
 
 lookupDeprec :: ModIface -> Name -> Maybe DeprecTxt
 lookupDeprec iface name
   = case mi_deprecs iface of
        NoDeprecs      -> Nothing
        DeprecAll txt  -> Just txt
-       DeprecSome env -> lookupNameEnv env name
+       DeprecSome env -> case lookupNameEnv env name of
+                           Just (_, txt) -> Just txt
+                           Nothing       -> Nothing
 
 type InstEnv    = UniqFM ClsInstEnv            -- Maps Class to instances for that class