Proposal: Extensible exceptions
igloo at earth.li
Tue Jul 8 19:19:11 EDT 2008
On Mon, Jul 07, 2008 at 02:34:56PM -0700, Iavor Diatchki wrote:
> Could you upload a package to hackage with the implementation of the
> new exception library, with module names that are separate from the
> current version?
I've attached a module which hopefully exposes the same interface as the
proposed new Exception module, except it doesn't include all the new
types. It should be sufficient to see how much change is necessary,
If you want to fill it out with types or put it on hackage then I have
no objections, although personally I think it would make more sense to
wait until the interface and hierarchy has settled down first.
> Otherwise, the trac description seems OK, although if most of the time
> "catch" needs to be replaced by "catchAny",
I think you've misunderstood something I said: Most of the problems are
solved by replacing catch with catchAny, but I don't know if most of the
uses of catch cause problems.
I wouldn't be that surprised if you're right, though, and most uses of
catch are of the form
... `catch` \e -> cleanup >> throw e
but if that's the case then I think we'd be better off replacing them
with the onException that Simon proposed.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 5607 bytes
Desc: not available
Url : http://www.haskell.org/pipermail/libraries/attachments/20080709/857a31c5/NewException-0001.bin
More information about the Libraries