Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/4104a615e8d8ce3443cd4fce0a85f63c3e7d9d0d

>---------------------------------------------------------------

commit 4104a615e8d8ce3443cd4fce0a85f63c3e7d9d0d
Author: Simon Marlow <[email protected]>
Date:   Fri Nov 18 14:59:37 2011 +0000

    hscParse: do not record a dependency on non-existent source files

>---------------------------------------------------------------

 compiler/main/HscMain.hs |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs
index b81afdc..4d106bd 100644
--- a/compiler/main/HscMain.hs
+++ b/compiler/main/HscMain.hs
@@ -149,6 +149,7 @@ import Control.Monad
 import Data.Maybe
 import Data.IORef
 import System.FilePath as FilePath
+import System.Directory
 
 #include "HsVersions.h"
 
@@ -365,9 +366,14 @@ hscParse' mod_summary = do
                           Just f  -> filter (/= FilePath.normalise f) srcs0
                           Nothing -> srcs0
 
+            -- sometimes we see source files from earlier
+            -- preprocessing stages that cannot be found, so just
+            -- filter them out:
+            srcs2 <- liftIO $ filterM doesFileExist srcs1
+
             return HsParsedModule {
                       hpm_module    = rdr_module,
-                      hpm_src_files = srcs1
+                      hpm_src_files = srcs2
                    }
 
 -- XXX: should this really be a Maybe X?  Check under which circumstances this



_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to