Proposal: Extensible exceptions
gale at sefer.org
Sun Jul 6 06:07:32 EDT 2008
Ian Lynagh wrote:
>>> It might even be possible to get rid of the Error class and use the
>>> Exception class instead.
David Menendez wrote:
> The Error class is cruft anyway. It only exists so that the Error and
> ErrorT monads can support "fail" and "mzero"...
> the error monads shouldn't conflate mzero
> and throwErr.
Agreed. So let's get rid of Error. But please - make it a two
step process that gives people time to adapt, not a sudden
discontinuity that breaks everything all at once.
> I have the guts of an extensible exception library modeled on Simon
> Marlow's paper that can coexist with the current Control.Exception
> regime. That is, exceptions thrown by "old" code can be caught by
> "new" code, and vice versa.
Nice. It looks like this addition would allow code that only mentions
old exception constructors to keep working, but it would still
break code that mentions old exception types. Is this correct?
If so, then it would definitely be helpful, but we would still need
a two-step deprecation path.
More information about the Libraries