Proposal: Deprecate and remove Prelude.catch and System.IO.Error.{catch,try}

Henning Thielemann lemming at henning-thielemann.de
Wed Dec 29 13:40:48 CET 2010


On Wed, 29 Dec 2010, Ian Lynagh wrote:

> One could say that qualified imports should be used, but having multiple
> catch's around sounds like a bug waiting to happen (unlike with
> functions like 'map', which will (almost always) give you a compile time
> error if you get the wrong one, the wrong 'catch' may silently catch too
> many or too few exceptions.
>
> Perhaps System.IO.Error should export catchIO and tryIO instead?

If you use a special monad transformer for exception handling (ErrorT, 
ExceptionalT, EitherT, Attempt ...) then you cannot accidentally use 
Prelude.catch.



More information about the Libraries mailing list