On 01/12/12 13:03, Magicloud Magiclouds wrote:
> Hi,
>   With Prelude.catch, I could write "catch () $ \_ -> return Nothing".
> But with Control.Exception.catch, I must specify a type for the "_".
> What should I do?

Use SomeException for the type, as it is the base of the exception
hierarchy.

(Although Haskell does not have classes in the OOP sense and therefore
does not have a built-in means of expressing subtype relations, it
emulates this in a somewhat awkward manner for exceptions.)

Cheers,
Greg

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to