summaryrefslogtreecommitdiff
path: root/libraries/base/Setup.hs
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/base/Setup.hs')
-rw-r--r--libraries/base/Setup.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/base/Setup.hs b/libraries/base/Setup.hs
index 40033bdcd0..e8f73b6a59 100644
--- a/libraries/base/Setup.hs
+++ b/libraries/base/Setup.hs
@@ -58,9 +58,9 @@ maybeUpdateFile :: FilePath -> FilePath -> IO ()
maybeUpdateFile source target = do
r <- rawSystem "cmp" ["-s" {-quiet-}, source, target]
case r of
- ExitSuccess -> return ()
- ExitFailure _ -> copyFile source target
- removeFile source
+ ExitSuccess -> removeFile source
+ ExitFailure _ -> do removeFile target; renameFile source target
+
filter_modules_hook :: Hook a -> Hook a
filter_modules_hook f pd lbi uhs x