From b07ade60d671421b44107d32ed8c45c9c58a3e40 Mon Sep 17 00:00:00 2001 From: ross Date: Mon, 2 Sep 2002 11:20:50 +0000 Subject: [PATCH] [project @ 2002-09-02 11:20:50 by ross] Minor rearrangement: the implementation of System.Exit.exitWith is GHC-specific, while exitFailure is portable. --- System/Exit.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/System/Exit.hs b/System/Exit.hs index d311d05..db37a7f 100644 --- a/System/Exit.hs +++ b/System/Exit.hs @@ -36,13 +36,13 @@ import Hugs.System -- program's caller. Before it terminates, any open or semi-closed -- handles are first closed. -#ifndef __HUGS__ +#ifdef __GLASGOW_HASKELL__ exitWith :: ExitCode -> IO a exitWith ExitSuccess = throw (ExitException ExitSuccess) exitWith code@(ExitFailure n) | n == 0 = ioException (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing) | otherwise = throw (ExitException code) +#endif /* __GLASGOW_HASKELL__ */ exitFailure :: IO a exitFailure = exitWith (ExitFailure 1) -#endif /* __HUGS__ */ -- 1.7.10.4