projects
/
ghc-prim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4e29a99
)
Fix compilation of Setup.hs with GHC 6.9
6_10_branch_has_been_forked
author
Ian Lynagh
<igloo@earth.li>
Tue, 16 Sep 2008 22:01:52 +0000
(22:01 +0000)
committer
Ian Lynagh
<igloo@earth.li>
Tue, 16 Sep 2008 22:01:52 +0000
(22:01 +0000)
Setup.hs
patch
|
blob
|
history
diff --git
a/Setup.hs
b/Setup.hs
index
ebd4ce7
..
5e736ab
100644
(file)
--- a/
Setup.hs
+++ b/
Setup.hs
@@
-16,7
+16,6
@@
import System.Cmd
import System.FilePath
import System.Exit
import System.Directory
import System.FilePath
import System.Exit
import System.Directory
-import Control.Exception (try)
main :: IO ()
main = do let hooks = simpleUserHooks {
main :: IO ()
main = do let hooks = simpleUserHooks {
@@
-85,5
+84,7
@@
maybeUpdateFile source target = do
r <- rawSystem "cmp" ["-s" {-quiet-}, source, target]
case r of
ExitSuccess -> removeFile source
r <- rawSystem "cmp" ["-s" {-quiet-}, source, target]
case r of
ExitSuccess -> removeFile source
- ExitFailure _ -> do try (removeFile target); renameFile source target
+ ExitFailure _ -> do exists <- doesFileExist target
+ when exists $ removeFile target
+ renameFile source target