
29 Dec
2010
29 Dec
'10
7:40 a.m.
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.