diff options
author | Simon Marlow <simonmar@microsoft.com> | 2007-11-23 09:22:19 +0000 |
---|---|---|
committer | Simon Marlow <simonmar@microsoft.com> | 2007-11-23 09:22:19 +0000 |
commit | ea2fdf071609947bd213a22fd3c4238f0e77ab86 (patch) | |
tree | a75133d14b88c6cc46b331274297683a37094faf /libraries/base/Setup.hs | |
parent | 7bac83d8b1a1c335f68498f50fd53804d30f4b0b (diff) | |
download | haskell-ea2fdf071609947bd213a22fd3c4238f0e77ab86.tar.gz |
FIX BUILD: maybeUpdateFile: ignore failures when removing the target
Diffstat (limited to 'libraries/base/Setup.hs')
-rw-r--r-- | libraries/base/Setup.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libraries/base/Setup.hs b/libraries/base/Setup.hs index e8f73b6a59..9575aa0a54 100644 --- a/libraries/base/Setup.hs +++ b/libraries/base/Setup.hs @@ -15,6 +15,7 @@ import System.Cmd import System.FilePath import System.Exit import System.Directory +import Control.Exception (try) main :: IO () main = do let hooks = defaultUserHooks { @@ -59,7 +60,7 @@ maybeUpdateFile source target = do r <- rawSystem "cmp" ["-s" {-quiet-}, source, target] case r of ExitSuccess -> removeFile source - ExitFailure _ -> do removeFile target; renameFile source target + ExitFailure _ -> do try (removeFile target); renameFile source target filter_modules_hook :: Hook a -> Hook a |