Proposal: die to System.Exit (and/or Prelude)

Roman Cheplyaka roma at
Sat Dec 14 11:21:55 UTC 2013

* Vo Minh Thu <noteed at> [2013-12-14 12:09:20+0100]
> Isn't your `die` function a special case of `error :: String -> a`,
> which is in the Prelude ?

There are two differences:

* die throws an exception in the IO monad (i.e. it uses `throwIO`,
  whereas `error` uses `throw`).
* error adds "*** Exception: " to the message

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <>

More information about the Libraries mailing list