[project @ 2004-01-23 13:55:28 by simonmar]
[ghc-hetmet.git] / ghc / compiler / main / HscTypes.lhs
index 113c386..20e2fb1 100644 (file)
@@ -28,7 +28,7 @@ module HscTypes (
 
        FixityEnv, FixItem(..), lookupFixity, emptyFixityEnv,
 
-       implicitTyThings, isImplicitTyThing,
+       implicitTyThings, 
 
        TyThing(..), tyThingClass, tyThingTyCon, tyThingDataCon, tyThingId,
        TypeEnv, lookupType, mkTypeEnv, emptyTypeEnv,
@@ -74,7 +74,7 @@ import Module
 import InstEnv         ( InstEnv, DFunId )
 import Rules           ( RuleBase )
 import CoreSyn         ( CoreBind )
-import Id              ( Id, isImplicitId )
+import Id              ( Id )
 import Type            ( TyThing(..) )
 
 import Class           ( Class, classSelIds, classTyCon )
@@ -93,7 +93,7 @@ import CoreSyn                ( IdCoreRule )
 import PrelNames       ( isBuiltInSyntaxName )
 import Maybes          ( orElse )
 import Outputable
-import SrcLoc          ( SrcLoc )
+import SrcLoc          ( SrcSpan )
 import UniqSupply      ( UniqSupply )
 import Maybe           ( fromJust )
 import FastString      ( FastString )
@@ -139,7 +139,7 @@ hscEPS hsc_env = readIORef (hsc_EPS hsc_env)
 The GhciMode is self-explanatory:
 
 \begin{code}
-data GhciMode = Batch | Interactive | OneShot 
+data GhciMode = Batch | Interactive | OneShot | IDE
              deriving Eq
 \end{code}
 
@@ -275,7 +275,7 @@ data ModDetails
 data ModGuts
   = ModGuts {
         mg_module   :: !Module,
-       mg_exports  :: !Avails,         -- What it exports
+       mg_exports  :: !NameSet,        -- What it exports
        mg_deps     :: !Dependencies,   -- What is below it, directly or otherwise
        mg_dir_imps :: ![Module],       -- Directly-imported modules; used to
                                        --      generate initialisation code
@@ -431,12 +431,6 @@ unQualInScope env
 %************************************************************************
 
 \begin{code}
-isImplicitTyThing :: TyThing -> Bool
-isImplicitTyThing (ADataCon dc) = True
-isImplicitTyThing (AnId id)     = isImplicitId id
-isImplicitTyThing (ATyCon tc)   = isClassTyCon tc
-isImplicitTyThing other                = False
-
 implicitTyThings :: TyThing -> [TyThing]
 implicitTyThings (AnId id)   = []
 
@@ -629,7 +623,7 @@ emptyIfaceFixCache n = defaultFixity
 type FixityEnv = NameEnv FixItem
 
 -- We keep the OccName in the range so that we can generate an interface from it
-data FixItem = FixItem OccName Fixity SrcLoc
+data FixItem = FixItem OccName Fixity SrcSpan
 
 instance Outputable FixItem where
   ppr (FixItem occ fix loc) = ppr fix <+> ppr occ <+> parens (ppr loc)