Commit 77ea2eb0 authored by SimonHengel's avatar SimonHengel Committed by Herbert Valerio Riedel

Add System.Exit.die (re #9016)

The original proposal discussion can be found at

  http://thread.gmane.org/gmane.comp.lang.haskell.libraries/20872

Note this also updates the Haddock submodule to remove Hadock's local
`die` implementation.
parent e2b14c70
......@@ -20,9 +20,11 @@ module System.Exit
, exitWith
, exitFailure
, exitSuccess
, die
) where
import Prelude
import System.IO
import GHC.IO
import GHC.IO.Exception
......@@ -74,3 +76,8 @@ exitFailure = exitWith (ExitFailure 1)
exitSuccess :: IO a
exitSuccess = exitWith ExitSuccess
-- | Write given error message to `stderr` and terminate with `exitFailure`.
--
-- /Since: 4.7.1.0/
die :: String -> IO ()
die err = hPutStrLn stderr err >> exitFailure
......@@ -8,6 +8,8 @@
* Add `Data.List.sortOn` sorting function
* Add `System.Exit.die`
* Weaken RealFloat constraints on some `Data.Complex` functions
## 4.7.0.0 *Apr 2014*
......
Subproject commit ac60bd1f98ad02644d3ea36dd4926ed6e105c789
Subproject commit 08aa509ebac58bfb202ea79c7c41291ec280a1c5
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment