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

Ian Lynagh igloo at
Mon Dec 27 13:36:33 CET 2010

Hi all,

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

Prelude and System.IO.Error both export an old version of catch, which
only catches IOError's, and System.IO.Error additionally exports try
with the same problem.

These exports are annoying for people who want to use the modern
exception handling functions in Control.Exception, as you need to
explicitly either import the Prelude with catch hidden, or give the
module of the function you want to use.

They may also be confusing for beginners, who may not expect to have to
use anything other than the catch function in the default scope to catch
all exceptions.

I believe these functions are only there for historical reasons, and are
old cruft that we should tidy up, so I propose that in the base package
that comes with GHC 7.2 we deprecate these old functions, and in 7.4 we
remove them.

Suggested deadline: 24 Jan 2011.


More information about the Libraries mailing list