[Haskell] Catching error / making library functions monadic (in failure)

Antoine Latter aslatter at gmail.com
Wed Oct 8 11:35:06 EDT 2008


On Wed, Oct 8, 2008 at 9:58 AM, Philip K.F. Hölzenspies
<p.k.f.holzenspies at utwente.nl> wrote:
>
> some_catch_function (error "foo") (error "bar")
>
> should result in an error "bar"
>

It's a good thing we've already got a function for that!

> Prelude.catch (error "foo") (error "bar")
*** Exception: foo

> Control.Exception.catch (error "foo") (error "bar")
*** Exception: bar

-Antoine


More information about the Haskell mailing list