summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsof <unknown>2001-07-12 16:25:32 +0000
committersof <unknown>2001-07-12 16:25:32 +0000
commit434ef2b14b37df405602a74838b8b38d0f5b4375 (patch)
tree5c21f979d0da66f76d7166fb124f6ed672ce741a
parente569a71efad5e5cf8d8c3426bb7635a2b6159335 (diff)
downloadhaskell-434ef2b14b37df405602a74838b8b38d0f5b4375.tar.gz
[project @ 2001-07-12 16:25:32 by sof]
ppFilesFromSummaries: to cope with recent driver changes, only report a file as being preprocessed if it differs from the source file(name). Fixes awfully bad breakage when using --make (source files were being deleted).
-rw-r--r--ghc/compiler/compMan/CompManager.lhs12
1 files changed, 11 insertions, 1 deletions
diff --git a/ghc/compiler/compMan/CompManager.lhs b/ghc/compiler/compMan/CompManager.lhs
index cc7ca589e2..30f0b58488 100644
--- a/ghc/compiler/compMan/CompManager.lhs
+++ b/ghc/compiler/compMan/CompManager.lhs
@@ -539,8 +539,18 @@ cmLoadFinish ok linkresult hst hit ui mods ghci_mode pcs
return (new_cmstate, ok, mods_loaded)
}
+-- used to fish out the preprocess output files for the purposes
+-- of cleaning up.
ppFilesFromSummaries summaries
- = [ fn | Just fn <- map (ml_hspp_file . ms_location) 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
+
-----------------------------------------------------------------------------
-- getValidLinkables