Target(..), TargetId(..), pprTarget, pprTargetId,
ModuleGraph, emptyMG,
- ModDetails(..),
+ ModDetails(..), emptyModDetails,
ModGuts(..), ModImports(..), ForeignStubs(..),
ModSummary(..), showModMsg, isBootSummary,
-- module. If so, use this instead of the file contents (this
-- is for use in an IDE where the file hasn't been saved by
-- the user yet).
-data Target = Target TargetId (Maybe StringBuffer)
+data Target = Target TargetId (Maybe (StringBuffer,ClockTime))
data TargetId
= TargetModule Module -- | A module name: search for the file
emptyPackageIfaceTable = emptyModuleEnv
data HomeModInfo
- = HomeModInfo { hm_iface :: ModIface,
- hm_details :: ModDetails,
- hm_linkable :: Linkable }
+ = HomeModInfo { hm_iface :: !ModIface,
+ hm_details :: !ModDetails,
+ hm_linkable :: !(Maybe Linkable) }
+ -- hm_linkable might be Nothing if:
+ -- a) this is an .hs-boot module
+ -- b) temporarily during compilation if we pruned away
+ -- the old linkable because it was out of date.
+ -- after a complete compilation (GHC.load), all hm_linkable
+ -- fields in the HPT will be Just.
\end{code}
Simple lookups in the symbol table.
md_rules :: ![IdCoreRule] -- Domain may include Ids from other modules
}
+emptyModDetails = ModDetails { md_types = emptyTypeEnv,
+ md_insts = [],
+ md_rules = [] }
+
-- A ModGuts is carried through the compiler, accumulating stuff as it goes
-- There is only one ModGuts at any time, the one for the module
-- being compiled right now. Once it is compiled, a ModIface and
ms_mod :: Module, -- Name of the module
ms_hsc_src :: HscSource, -- Source is Haskell, hs-boot, external core
ms_location :: ModLocation, -- Location
- ms_hs_date :: ClockTime, -- Timestamp of summarised file
+ ms_hs_date :: ClockTime, -- Timestamp of source file
+ ms_obj_date :: Maybe ClockTime, -- Timestamp of object, maybe
ms_srcimps :: [Module], -- Source imports
ms_imps :: [Module], -- Non-source imports
ms_hspp_file :: Maybe FilePath, -- Filename of preprocessed source,