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

Henning Thielemann lemming at
Mon Dec 27 16:18:05 CET 2010

On Mon, 27 Dec 2010, Ian Lynagh wrote:

> On Mon, Dec 27, 2010 at 02:37:58PM +0100, Henning Thielemann wrote:
>> After all I think
>> that current exception handling in Control.Exception is only a temporary
>> solution until we have a stable system with explicit exception lists
>> encoded in types. Thus removing one broken temporary solution
>> (Prelude.catch) in order to force people to use the other broken
>> temporary solution (Control.Exception.catch) sounds not good for me.
> I think that while this proposal does not make things perfect, it does
> make them better, and that perfection is some way off.

For me the currently cleanest solution is to quickly convert an IO action 
to (ExceptionalT IOError IO a) using Prelude.catch and my 
explicit-exception package and then define and use my own exceptions 
additionally to IOError that are explicit in the type. From this 
perspective extensible-exception with existentially quantified (i.e. 
hidden) exception type was a step in the wrong direction, that now asks 
for further steps in the wrong direction.

I wonder, how can we safely remove 'catch' from Prelude, at all. I always 
thought that Prelude is fixed as is. Otherwise Haskell 98 programs will 

More information about the Libraries mailing list