Prelude.catch Re: Proposal: System.Environment.getEnv should return Maybe

Ian Lynagh igloo at
Thu Feb 23 14:56:03 CET 2012

On Thu, Feb 23, 2012 at 09:17:00AM +0100, Christian Maeder wrote:
> And now I learn that Prelude.catch is the right version for i.e.
> file IO (so I should probably switch off that hlint "Error").

I'd disagree that using Prelude.catch is right.

I think what John really wants to distinguish between is exceptions
thrown in the IO monad, e.g. by Control.Exception.throwIO, from
exceptions that may be thrown from pure code, e.g. by
Control.Exception.throw. But you can throw exceptions of any type with
either function.


More information about the Libraries mailing list