\begin{code}
module CmTypes (
Unlinked(..), isObject, nameOfObject, isInterpretable,
- Linkable(..), linkableTime,
+ Linkable(..),
ModSummary(..), ms_allimps, name_of_summary, pprSummaryTime
) where
import Interpreter
import HscTypes
import Module
-import CmStaticInfo
+--import CmStaticInfo
import Outputable
import Time ( ClockTime )
= DotO FilePath
| DotA FilePath
| DotDLL FilePath
- | Trees [UnlinkedIBind] ItblEnv -- bunch of interpretable bindings, +
- -- a mapping from DataCons to their itbls
+ | BCOs [UnlinkedBCO] ItblEnv -- bunch of interpretable bindings, +
+ -- a mapping from DataCons to their itbls
instance Outputable Unlinked where
ppr (DotO path) = text "DotO" <+> text path
ppr (DotA path) = text "DotA" <+> text path
ppr (DotDLL path) = text "DotDLL" <+> text path
- ppr (Trees binds _) = text "Trees" <+> ppr binds
+ ppr (BCOs bcos _) = text "BCOs" <+> vcat (map ppr bcos)
isObject (DotO _) = True
isObject (DotA _) = True
nameOfObject (DotA fn) = fn
nameOfObject (DotDLL fn) = fn
-isInterpretable (Trees _ _) = True
-isInterpretable _ = False
+isInterpretable (BCOs _ _) = True
+isInterpretable _ = False
-data Linkable
- = LM ClockTime ModuleName [Unlinked]
- | LP PackageName
+data Linkable = LM {
+ linkableTime :: ClockTime,
+ linkableModName :: ModuleName,
+ linkableUnlinked :: [Unlinked]
+ }
instance Outputable Linkable where
ppr (LM when_made mod_nm unlinkeds)
= text "LinkableM" <+> parens (text (show when_made)) <+> ppr mod_nm
<+> ppr unlinkeds
- ppr (LP package_nm)
- = text "LinkableP" <+> ptext package_nm
-
-linkableTime (LM when_made mod_nm unlinkeds) = when_made
-linkableTime (LP package_nm) = panic "linkableTime"
-
-- The ModuleLocation contains both the original source filename and the
-- filename of the cleaned-up source file after all preprocessing has been