[Git][ghc/ghc][master] Correct `exitWith` Haddocks

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Mon Dec 19 00:34:05 UTC 2022



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
6fe2d778 by amesgen at 2022-12-18T19:33:49-05:00
Correct `exitWith` Haddocks

The `IOError`-specific `catch` in the Prelude is long gone.

- - - - -


1 changed file:

- libraries/base/System/Exit.hs


Changes:

=====================================
libraries/base/System/Exit.hs
=====================================
@@ -45,16 +45,14 @@ import GHC.IO.Exception
 -- A program that terminates successfully without calling 'exitWith'
 -- explicitly is treated as if it had called 'exitWith' 'ExitSuccess'.
 --
--- As an 'ExitCode' is not an 'IOError', 'exitWith' bypasses
--- the error handling in the 'IO' monad and cannot be intercepted by
--- 'catch' from the "Prelude".  However it is a 'Control.Exception.SomeException', and can
--- be caught using the functions of "Control.Exception".  This means
--- that cleanup computations added with 'Control.Exception.bracket'
--- (from "Control.Exception") are also executed properly on 'exitWith'.
+-- As an 'ExitCode' is an 'Control.Exception.Exception', it can be
+-- caught using the functions of "Control.Exception".  This means that
+-- cleanup computations added with 'Control.Exception.bracket' (from
+-- "Control.Exception") are also executed properly on 'exitWith'.
 --
 -- Note: in GHC, 'exitWith' should be called from the main program
 -- thread in order to exit the process.  When called from another
--- thread, 'exitWith' will throw an 'ExitException' as normal, but the
+-- thread, 'exitWith' will throw an 'ExitCode' as normal, but the
 -- exception will not cause the process itself to exit.
 --
 exitWith :: ExitCode -> IO a



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6fe2d778e9ad015f35c520724d7f222a015586ed

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/6fe2d778e9ad015f35c520724d7f222a015586ed
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221218/800f0fc0/attachment-0001.html>


More information about the ghc-commits mailing list