#include "HsVersions.h"
-import CmLink ( Linkable(..) )
-import Outputable ( SDoc )
-import CmFind ( Finder )
-import CmSummarise ( ModSummary, name_of_summary )
-import FiniteMap ( FiniteMap, emptyFM )
-
-import Module ( Module )
-import RnMonad ( Avails, GlobalRdrEnv, DeclsMap,
- WhetherHasOrphans, ImportVersion,
- IfaceInsts, IfaceRules, ExportItem )
-import TcEnv ( TyThing, InstEnv )
-import Name ( Name, OccName )
-import BasicTypes ( Fixity, Version )
-import Id ( Id )
-import CoreSyn ( CoreRule )
-import RdrHsSyn ( RdrNameDeprecation, RdrNameRuleDecl, RdrNameFixitySig,
- RdrNameHsDecl, RdrNameInstDecl )
-
+-- many of these need to be moved to HscTypes
+--import CmLink ( Linkable(..) )
+--import Outputable ( SDoc )
+--import CmFind ( Finder )
+--import CmSummarise ( ModSummary, name_of_summary )
+--import FiniteMap ( FiniteMap, emptyFM )
+
+--import Module ( Module )
+--import RnMonad ( Avails, GlobalRdrEnv, DeclsMap,
+-- WhetherHasOrphans, ImportVersion,
+-- IfaceInsts, IfaceRules, ExportItem )
+--import TcEnv ( TyThing, InstEnv )
+--import Name ( Name, OccName )
+--import BasicTypes ( Fixity, Version )
+--import Id ( Id )
+--import CoreSyn ( CoreRule )
+--import RdrHsSyn ( RdrNameDeprecation, RdrNameRuleDecl, RdrNameFixitySig,
+-- RdrNameHsDecl, RdrNameInstDecl )
+
+import HscTypes ( )
\end{code}
A @ModDetails@ summarises everything we know about a compiled module
-\begin{code}
-data ModDetails
- = ModDetails {
- moduleExports :: Avails, -- What it exports
- moduleEnv :: GlobalRdrEnv, -- Its top level environment
-
- fixityEnv :: NameEnv Fixity,
- deprecEnv :: NameEnv DeprecTxt,
- typeEnv :: NameEnv TyThing, -- TyThing is in TcEnv.lhs
-
- instEnv :: InstEnv,
- ruleEnv :: IdEnv [CoreRule] -- Domain includes Ids from other modules
- }
-\end{code}
-
Auxiliary definitions
\begin{code}
+{- I DONT think this should be here -- should be in HscTypes
type DeprecationEnv = NameEnv DeprecTxt -- Give reason for deprecation
type GlobalRdrEnv = RdrNameEnv [Name] -- The list is because there may be name clashes
type AvailInfo = GenAvailInfo Name
type RdrAvailInfo = GenAvailInfo OccName
type Avails = [AvailInfo]
+-}
\end{code}
data PersistentCompilerState
= PCS {
pcsPST :: PackageSymbolTable, -- Domain = non-home-package modules
- pcsHP :: HoldingPen, -- Pre-slurped interface bits and pieces
+ pcsHP :: RnMonad.HoldingPen, -- Pre-slurped interface bits and pieces
pcsNS :: NameSupply -- Allocate uniques for names
}
nsNames :: FiniteMap (Module,OccName) Name -- Ensures that one original name gets one unique
nsIParam :: FiniteMap OccName Name -- Ensures that one implicit parameter name gets one unique
}
+=======
+>>>>>>> 1.9
+=======
+
+-- should be somewhere else?
+emptyPCS :: IO PersistentCompilerState
+emptyPCS = return (PersistentCompilerState
+ { pcs_modmap = emptyFM,
+ pcs_pit = emptyPIT,
+ pcs_pst = emptyPST,
+ pcs_hp = emptyHoldingPen })
+>>>>>>> 1.10
\end{code}
-
-%************************************************************************
-%* *
-\subsection{ModIface}
-%* *
-%************************************************************************
-
-\begin{code}
--- ModIFace is nearly the same as RnMonad.ParsedIface.
--- Right now it's identical :)
-data ModIFace
- = ModIFace {
- mi_mod :: Module, -- Complete with package info
- mi_vers :: Version, -- Module version number
- mi_orphan :: WhetherHasOrphans, -- Whether this module has orphans
- mi_usages :: [ImportVersion OccName], -- Usages
- mi_exports :: [ExportItem], -- Exports
- mi_insts :: [RdrNameInstDecl], -- Local instance declarations
- mi_decls :: [(Version, RdrNameHsDecl)], -- Local definitions
- mi_fixity :: (Version, [RdrNameFixitySig]), -- Local fixity declarations,
- -- with their version
- mi_rules :: (Version, [RdrNameRuleDecl]), -- Rules, with their version
- mi_deprecs :: [RdrNameDeprecation] -- Deprecations
- }
-
-\end{code}