From: rrt Date: Thu, 18 Oct 2001 10:31:48 +0000 (+0000) Subject: [project @ 2001-10-18 10:31:48 by rrt] X-Git-Tag: Approximately_9120_patches~794 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fa8b487bc0e532a39ec53b4105fc8d1245c9fdc7;hp=1970492e0b9d5f9408486c7b6221345885857007;p=ghc-hetmet.git [project @ 2001-10-18 10:31:48 by rrt] I think catch was introduced long ago enough now that we can use it instead of catchAllIO. If it's still a problem, then this file can be treated like e.g. ghc-pkg/Main.hs. --- diff --git a/ghc/compiler/main/SysTools.lhs b/ghc/compiler/main/SysTools.lhs index 4bd3284..a110bb9 100644 --- a/ghc/compiler/main/SysTools.lhs +++ b/ghc/compiler/main/SysTools.lhs @@ -56,7 +56,7 @@ import Panic ( progName, GhcException(..) ) import Util ( global ) import CmdLineOpts ( dynFlag, verbosity ) -import Exception ( throwDyn, catchAllIO ) +import Exception ( throwDyn, catch ) import IO import Directory ( doesFileExist, removeFile ) import IOExts ( IORef, readIORef, writeIORef ) @@ -641,7 +641,7 @@ removeTmpFiles verb fs ("Deleting: " ++ unwords fs) (mapM_ rm fs) where - rm f = removeFile f `catchAllIO` + rm f = removeFile f `catch` (\_ignored -> when (verb >= 2) $ hPutStrLn stderr ("Warning: deleting non-existent " ++ f) @@ -708,7 +708,7 @@ traceCmd phase_name cmd_line action ; unless n $ do { -- And run it! - ; action `catchAllIO` handle_exn verb + ; action `catch` handle_exn verb }} where handle_exn verb exn = do { when (verb >= 2) (hPutStr stderr "\n")