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

Roman Cheplyaka roma at ro-che.info
Sat Dec 14 11:21:55 UTC 2013


* Vo Minh Thu <noteed at gmail.com> [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

Roman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://www.haskell.org/pipermail/libraries/attachments/20131214/371cf5fb/attachment.sig>


More information about the Libraries mailing list