
18 Dec
2013
18 Dec
'13
2:15 a.m.
Hi,
On Mon, Dec 16, 2013 at 6:53 PM, Herbert Valerio Riedel
Why not simply use the existing `fail :: String -> IO a` method instead?
The differences & similiarities I see wrt `fail`:
- `die` throws an `ExitCode` exception, whereas `fail` throws an `IOError` exception
- Both result in the message written to stderr and a non-zero exit code
One problem with 'fail' is that the error message is surrounded by "user error (" and ")". This is ok for debugging, but it can be confusing for the end user. Add System.Exit.die: +1 Re-export it from Prelude: +0 Takano Akio