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

Isaac Dupree ml at isaac.cedarswampstudios.org
Wed Jan 5 06:16:01 CET 2011


On 01/05/11 00:07, Isaac Dupree wrote:
> On 01/04/11 13:20, Ian Lynagh wrote:
>> GHC actually can't currently deprecate one export of 'catch' but not the
>> other. Because of this, and because of the possible confusion etc with
>> having 2 'catch' functions, I suggest we add catchIO and tryIO to
>> System.IO.Error too. This will also give the new report a catch function
>> it can refer to without having to worry about existential
>> quantification etc.
>
> Noooooooooooooooooo! Then "throwIO" will throw an exception and
> "catchIO" won't catch it. I will feel horribly confused; or at least
> some people probably will. Thoughts?

Perhaps "catchIOError" and "tryIOError"?  (I suggest "*IOError" not 
"*IOException" for consistency with the other functions in 
System.IO.Error, but "catchIOException" is fine with me too.)



More information about the Libraries mailing list