[project @ 2000-10-30 13:46:24 by sewardj]
[ghc-hetmet.git] / ghc / compiler / main / HscTypes.lhs
index ec776c7..1d6e371 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 )
@@ -87,9 +87,9 @@ import UniqSupply     ( UniqSupply )
 \begin{code}
 data ModuleLocation
    = ModuleLocation {
-       hs_file  :: FilePath,
-       hi_file  :: FilePath,
-       obj_file :: FilePath
+       hs_preprocd_file :: FilePath,   -- location after preprocessing
+       hi_file          :: FilePath,
+       obj_file         :: FilePath
      }
      deriving Show
 
@@ -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