dagit at codersbase.com
Sat Nov 1 21:15:37 EDT 2008
On Wed, Oct 8, 2008 at 1:19 AM, Simon Marlow <marlowsd at gmail.com> wrote:
> Johannes Waldmann wrote:
>> with 6.10, the following does not typecheck:
>> foo `Control.Exception.catch` \ _ -> return bar
>> Ambiguous type variable `e' in the constraint:
>> `Control.Exception.Exception e'
>> It is probably bad programming style anyway but what is the workaround?
> As long as you're aware that it is bad programming style. We deliberately
> didn't include an easy way to do this, because we want people to think about
> why they need to catch *all* exceptions (most of the time it's a bug).
Since the above is bad form, what should I be doing? Could someone
please provide some examples or point me at the list of exceptions
that I can catch? What about catching multiple types of exceptions?
More information about the Glasgow-haskell-users