Permalink
Browse files

Fix compilation of Setup.hs with GHC 6.9

  • Loading branch information...
1 parent 4e29a99 commit b651c80fe948fea06f39fa7476da4963e4dfcb4c @igfoo igfoo committed Sep 16, 2008
Showing with 3 additions and 2 deletions.
  1. +3 −2 Setup.hs
View
@@ -16,7 +16,6 @@ import System.Cmd
import System.FilePath
import System.Exit
import System.Directory
-import Control.Exception (try)
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
- ExitFailure _ -> do try (removeFile target); renameFile source target
+ ExitFailure _ -> do exists <- doesFileExist target
+ when exists $ removeFile target
+ renameFile source target

0 comments on commit b651c80

Please sign in to comment.