Re: [Haskell] Re: Exceptions

2004-11-23 Thread Ben Rudiak-Gould
John Goerzen wrote: >main = do > xs <- return [ 1, 2, error "throw" ] > `catch` \ any -> do > putStrLn "caught" > return [ 4, 5, 6 ] > print xs > >When run, I get: Fail: throw > >In any case, in the more general case, I don't see a problem with that. >I get a

[Haskell] Re: Exceptions

2004-11-23 Thread John Goerzen
On 2004-11-23, Johannes Waldmann <[EMAIL PROTECTED]> wrote: > in the following example, the handler won't catch the exception > because of lazy evaluation. therefore, it's a different story > than with exceptions in ML, Python, whatever strict language. > > main = do > xs <- return [ 1, 2, err