[Haskell] Exceptions

2004-11-23 Thread Johannes Waldmann
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, error "throw" ] `catch` \ any -> do putStrLn "caught"

[Haskell] Exceptions in types and exception-free programming

2004-06-24 Thread oleg
S. Alexander Jacobson wrote: > Also, is there a way to get the typesystem to > tell you which functions may fail i.e. which > functions have failMsg as an implicit parameter? Generally speaking, that is not that easy. If we have a functional composition (foo . bar), we wish its