From: Don Stewart Date: Wed, 13 Feb 2008 22:26:44 +0000 (+0000) Subject: Add exitSuccess :: IO a. For symmetry with exitFailure X-Git-Tag: 2008-05-28~68 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=4fc422dc9eda25fd202d03fa3b52c9a89f0cbe47;p=ghc-base.git Add exitSuccess :: IO a. For symmetry with exitFailure --- diff --git a/System/Exit.hs b/System/Exit.hs index 1dab14f..23e6a6d 100644 --- a/System/Exit.hs +++ b/System/Exit.hs @@ -13,10 +13,11 @@ ----------------------------------------------------------------------------- module System.Exit - ( + ( ExitCode(ExitSuccess,ExitFailure) , exitWith -- :: ExitCode -> IO a , exitFailure -- :: IO a + , exitSuccess -- :: IO a ) where import Prelude @@ -72,3 +73,9 @@ exitWith code@(ExitFailure n) -- where /exitfail/ is implementation-dependent. exitFailure :: IO a exitFailure = exitWith (ExitFailure 1) + +-- | The computation 'exitSuccess' is equivalent to +-- 'exitWith' 'ExitSuccess', It terminates the program +-- sucessfully. +exitSuccess :: IO a +exitSuccess = exitWith ExitSuccess