return (new_cmstate, ok, mods_loaded)
--- used to fish out the preprocess output files for the purposes
--- of cleaning up.
+-- used to fish out the preprocess output files for the purposes of
+-- cleaning up. The preprocessed file *might* be the same as the
+-- source file, but that doesn't do any harm.
ppFilesFromSummaries summaries
- = [ fn | Just fn <- map toPpFile summaries ]
- where
- toPpFile sum
- | hspp /= ml_hs_file loc = hspp
- | otherwise = Nothing
- where
- loc = ms_location sum
- hspp = ml_hspp_file loc
-
+ = [ fn | Just fn <- map (ml_hspp_file.ms_location) summaries ]
-----------------------------------------------------------------------------
-- getValidLinkables
= do hspp_fn <- preprocess file
(srcimps,imps,mod_name) <- getImportsFromFile hspp_fn
- let (path, basename, ext) = splitFilename3 file
- -- GHC.Prim doesn't exist physically, so don't go looking for it.
+ let -- GHC.Prim doesn't exist physically, so don't go looking for it.
the_imps = filter (/= gHC_PRIM_Name) imps
- (mod, location) <- mkHomeModLocation mod_name True{-is a root-}
- path basename ext
+ (mod, location) <- mkHomeModLocation mod_name file
src_timestamp
<- case ml_hs_file location of