summaryrefslogtreecommitdiff
path: root/libraries/base/System/Exit.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2013-09-15 23:05:05 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2013-09-17 09:54:07 +0200
commit0f5eae0232a86ec57d841a83e6929361e2751270 (patch)
tree7cc7b87fce8238cd9ff6b65fb0c37f515191aa6e /libraries/base/System/Exit.hs
parent43ece172e7045d5ba633be6193f3e908eaa81f00 (diff)
downloadhaskell-0f5eae0232a86ec57d841a83e6929361e2751270.tar.gz
Constant-fold `__GLASGOW_HASKELL__` CPP conditionals
Now that HUGS and NHC specific code has been removed, this commit "folds" the now redundant `#if((n)def)`s containing `__GLASGOW_HASKELL__`. This renders `base` officially GHC only. This commit also removes redundant `{-# LANGUAGE CPP #-}`. Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>
Diffstat (limited to 'libraries/base/System/Exit.hs')
-rw-r--r--libraries/base/System/Exit.hs5
1 files changed, 0 insertions, 5 deletions
diff --git a/libraries/base/System/Exit.hs b/libraries/base/System/Exit.hs
index dbe2ce0ce0..a3059fcf9b 100644
--- a/libraries/base/System/Exit.hs
+++ b/libraries/base/System/Exit.hs
@@ -1,5 +1,4 @@
{-# LANGUAGE Trustworthy #-}
-{-# LANGUAGE CPP #-}
-----------------------------------------------------------------------------
-- |
@@ -25,10 +24,8 @@ module System.Exit
import Prelude
-#ifdef __GLASGOW_HASKELL__
import GHC.IO
import GHC.IO.Exception
-#endif
-- ---------------------------------------------------------------------------
-- exitWith
@@ -63,9 +60,7 @@ exitWith :: ExitCode -> IO a
exitWith ExitSuccess = throwIO ExitSuccess
exitWith code@(ExitFailure n)
| n /= 0 = throwIO code
-#ifdef __GLASGOW_HASKELL__
| otherwise = ioError (IOError Nothing InvalidArgument "exitWith" "ExitFailure 0" Nothing Nothing)
-#endif
-- | The computation 'exitFailure' is equivalent to
-- 'exitWith' @(@'ExitFailure' /exitfail/@)@,