[project @ 2000-10-30 09:52:14 by simonpj]
[ghc-hetmet.git] / ghc / compiler / main / HscTypes.lhs
index ec776c7..e7f639d 100644 (file)
@@ -65,7 +65,7 @@ import HsSyn          ( DeprecTxt )
 import RdrHsSyn                ( RdrNameHsDecl, RdrNameTyClDecl )
 import RnHsSyn         ( RenamedTyClDecl, RenamedRuleDecl, RenamedInstDecl )
 
-import CoreSyn         ( CoreRule, IdCoreRule )
+import CoreSyn         ( IdCoreRule )
 import Type            ( Type )
 
 import FiniteMap       ( FiniteMap, emptyFM, addToFM, lookupFM, foldFM )
@@ -308,14 +308,12 @@ data Deprecations = NoDeprecs
                                                                -- 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 -> case lookupNameEnv env name of
-                           Just (_, txt) -> Just txt
-                           Nothing       -> Nothing
+lookupDeprec :: Deprecations -> Name -> Maybe DeprecTxt
+lookupDeprec NoDeprecs        name = Nothing
+lookupDeprec (DeprecAll  txt) name = Just txt
+lookupDeprec (DeprecSome env) name = case lookupNameEnv env name of
+                                           Just (_, txt) -> Just txt
+                                           Nothing       -> Nothing
 
 type InstEnv    = UniqFM ClsInstEnv            -- Maps Class to instances for that class