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

Ivan Lazar Miljenovic ivan.miljenovic at
Mon Dec 27 13:43:50 CET 2010

On 27 December 2010 23:36, Ian Lynagh <igloo at> wrote:
> 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.

I like this proposal; having to explicitly hide Prelude.catch keeps
tripping me up/annoying me all the time.

Ivan Lazar Miljenovic
Ivan.Miljenovic at

More information about the Libraries mailing list