Fix sloppy recompilation checking in cabal-helper-wrapper

This commit is contained in:
Daniel Gröber 2015-03-06 14:04:31 +01:00
parent 9d5ee06af8
commit b3b4b91ff8
1 changed files with 7 additions and 3 deletions

View File

@ -203,9 +203,13 @@ compile Compile {..} = do
recompile <-
case cabalSourceDir of
Nothing -> do
tsrcs <- timeHsFiles cabalHelperSourceDir
texe <- timeMaybe exe
return $ any ((texe <) . Just) tsrcs
exists <- doesFileExist exe
case exists of
False -> return True
True -> do
tsrcs <- timeHsFiles cabalHelperSourceDir
texe <- timeFile exe
return $ any (texe <) tsrcs
Just _ -> return True -- let ghc do the difficult recomp checking
let Version (mj:mi:_) _ = cabalVersion