
12 Jan
2012
12 Jan
'12
1:34 a.m.
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