From fa8b487bc0e532a39ec53b4105fc8d1245c9fdc7 Mon Sep 17 00:00:00 2001 From: rrt Date: Thu, 18 Oct 2001 10:31:48 +0000 Subject: [PATCH] [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. --- ghc/compiler/main/SysTools.lhs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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") -- 1.7.10.4