Proposal: System.Environment.getEnv should return Maybe

John Meacham john at repetae.net
Thu Feb 23 22:05:41 CET 2012


On Thu, Feb 23, 2012 at 8:18 AM, Bas van Dijk <v.dijk.bas at gmail.com> wrote:
> On 23 February 2012 01:07, Evan Laforge <qdunkan at gmail.com> wrote:
>> Good point, I had forgotten about the Prelude catch.  I think I can go
>> remove a bunch of ScopedTypedVariables now.
>
> Note that Prelude.catch has been deprecated in favor of
> Control.Exception.catch. If you want to catch IOErrors you can either
> use ScopedTypedVariables or System.IO.Error.catchIOError.

Control.Exception.catch is not in haskell 98 or haskell 2010. It also requires
pulling in some heavy extensions and actually has fundamentally different
behavior than Prelude.catch. We definitely should not consider it a
replacement.

    John



More information about the Libraries mailing list