4 Nov 01:27
Re: Control.Exception
shelarcy <shelarcy <at> gmail.com>
2008-11-04 00:27:13 GMT
2008-11-04 00:27:13 GMT
On Tue, 04 Nov 2008 07:40:50 +0900, David Menendez <dave <at> zednenem.com> wrote: >> ie: >> >> 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) -> ...) http://www.haskell.org/pipermail/libraries/2008-July/010095.html Best Regards, -- -- shelarcy <shelarcy hotmail.co.jp> http://page.freett.com/shelarcy/
RSS Feed