From 419d923e9236e997e3cd124f859360edc2b27fcd Mon Sep 17 00:00:00 2001 From: qrczak Date: Sat, 2 Jun 2001 09:45:51 +0000 Subject: [PATCH] [project @ 2001-06-02 09:45:51 by qrczak] Don't panic on ExitException. --- ghc/compiler/main/DriverUtil.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/ghc/compiler/main/DriverUtil.hs b/ghc/compiler/main/DriverUtil.hs index 8ddc416..210acdb 100644 --- a/ghc/compiler/main/DriverUtil.hs +++ b/ghc/compiler/main/DriverUtil.hs @@ -1,5 +1,5 @@ ----------------------------------------------------------------------------- --- $Id: DriverUtil.hs,v 1.22 2001/05/28 03:31:19 sof Exp $ +-- $Id: DriverUtil.hs,v 1.23 2001/06/02 09:45:51 qrczak Exp $ -- -- Utils for the driver -- @@ -108,7 +108,13 @@ handleDyn :: Typeable ex => (ex -> IO a) -> IO a -> IO a handleDyn = flip catchDyn handle :: (Exception -> IO a) -> IO a -> IO a +#if __GLASGOW_HASKELL__ < 501 handle = flip Exception.catchAllIO +#else +handle h f = f `Exception.catch` \e -> case e of + ExitException _ -> throw e + _ -> h e +#endif split :: Char -> String -> [String] split c s = case rest of -- 1.7.10.4