[project @ 2001-05-24 13:59:09 by simonpj]
[ghc-hetmet.git] / ghc / compiler / compMan / CmTypes.lhs
index ef2a785..113588d 100644 (file)
@@ -6,7 +6,7 @@
 \begin{code}
 module CmTypes ( 
    Unlinked(..),  isObject, nameOfObject, isInterpretable,
-   Linkable(..),
+   Linkable(..), isObjectLinkable, 
    ModSummary(..), ms_allimps, name_of_summary, pprSummaryTime
   ) where
 
@@ -50,6 +50,9 @@ data Linkable = LM {
   linkableUnlinked ::  [Unlinked]
  }
 
+isObjectLinkable :: Linkable -> Bool
+isObjectLinkable l = all isObject (linkableUnlinked l)
+
 instance Outputable Linkable where
    ppr (LM when_made mod_nm unlinkeds)
       = text "LinkableM" <+> parens (text (show when_made)) <+> ppr mod_nm 
@@ -67,10 +70,11 @@ data ModSummary
         ms_location :: ModuleLocation,       -- location
         ms_srcimps  :: [ModuleName],         -- source imports
         ms_imps     :: [ModuleName],         -- non-source imports
-        ms_hs_date  :: Maybe ClockTime       -- timestamp of summarised
-                                             -- file, if home && source
+        ms_hs_date  :: ClockTime            -- timestamp of summarised file
      }
 
+-- ToDo: shouldn't ms_srcimps and ms_imps be [Module]?  --SDM
+
 instance Outputable ModSummary where
    ppr ms
       = sep [text "ModSummary {",