summaryrefslogtreecommitdiff
path: root/libraries/base/Setup.hs
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-11-21 08:43:41 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-11-21 08:43:41 +0000
commit460f3686c7a9db2c3b581a13aad092bd47e28766 (patch)
tree27be34c0431fba32ea58d5bd5068692947f616df /libraries/base/Setup.hs
parent5f59f657556ccde209b17784d74e0eb38312b989 (diff)
downloadhaskell-460f3686c7a9db2c3b581a13aad092bd47e28766.tar.gz
Fix compilation with GHC 6.2.x
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