
14 Dec
2013
14 Dec
'13
1:56 p.m.
On 2013-12-14 at 12:09:20 +0100, Vo Minh Thu wrote: [...]
I propose to add
die :: String -> IO () die err = hPutStrLn stderr err >> exitFailure
to System.Exit.
[...]
Isn't your `die` function a special case of `error :: String -> a`, which is in the Prelude ?
Imho, it'd be more comparable to the effect of `fail :: Monad m =>
String -> m a` for 'm == IO' (which throws an 'userError' exception).
E.g.:
$ cat > foo.hs <