From b3b4b91ff8ccce43d6d8b722c7b2e9eb58973e0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Gr=C3=B6ber?= Date: Fri, 6 Mar 2015 14:04:31 +0100 Subject: [PATCH] Fix sloppy recompilation checking in cabal-helper-wrapper --- CabalHelper/Wrapper.hs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CabalHelper/Wrapper.hs b/CabalHelper/Wrapper.hs index 68601a9..880b28f 100644 --- a/CabalHelper/Wrapper.hs +++ b/CabalHelper/Wrapper.hs @@ -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