On Tue, 04 Nov 2008 19:41:58 +0900, Duncan Coutts <[EMAIL PROTECTED]> wrote:
>> >> action
>> >>  `catches`
>> >>    [ \(e :: ExitCode) -> ...
>> >>    , \(e :: PatternMatchFail) -> ...
>> >>    ]
>> >>
>> >> or just by using multiple catch clauses:
>> >>
>> >> action
>> >>  `catch` (\(e :: ExitCode) -> ...)
>> >>  `catch` (\(e :: PatternMatchFail) -> ...)
>> >
>> > I don't think those are equivalent. In the second case, the
>> > PatternMatchFail handler scopes over the ExitCode handler.
>>
>> I think Duncan forgot to write parens. According to Ian's example,
>> here is an equivalent code.
>>
>> (action
>>   `catch` (\(e :: ExitCode) -> ...))
>>   `catch` (\(e :: PatternMatchFail) -> ...)
>
> David is right. If the exit code handler throws a pattern match
> exception then the code behaves differently than the `catches` version.

I see. I misunderstood the problem.

Thanks,

-- 
shelarcy <shelarcy    hotmail.co.jp>
http://page.freett.com/shelarcy/
_______________________________________________
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to