import Prelude
#ifdef __GLASGOW_HASKELL__
+import GHC.Exception
import GHC.IOBase
#endif
#ifndef __NHC__
exitWith :: ExitCode -> IO a
-exitWith ExitSuccess = throwIO (ExitException ExitSuccess)
+exitWith ExitSuccess = throwIO ExitSuccess
exitWith code@(ExitFailure n)
- | n /= 0 = throwIO (ExitException code)
+ | n /= 0 = throwIO code
#ifdef __GLASGOW_HASKELL__
| otherwise = ioError (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing)
#endif