From 4fc422dc9eda25fd202d03fa3b52c9a89f0cbe47 Mon Sep 17 00:00:00 2001 From: Don Stewart Date: Wed, 13 Feb 2008 22:26:44 +0000 Subject: [PATCH] Add exitSuccess :: IO a. For symmetry with exitFailure --- System/Exit.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 -- 1.7.10.4