[Haskell] IO, exceptions and error handling

Keith Wansbrough Keith.Wansbrough at cl.cam.ac.uk
Mon Jun 14 09:46:37 EDT 2004


> I can't see any fundamental reason why exception handling has to occur in 
> the IO monad.

Read the paper _A Semantics for Imprecise Exceptions_.  The problem is that the evaluation order of Haskell would have to be fixed for this not to lose referential transparency.  What is the value of

catchExcept (show (makeExcept "E1" + makeExcept "E2")) (\x -> x)

?  Haskell wouldn't be "purely functional" any more.

http://research.microsoft.com/~simonpj/Papers/imprecise-exn.htm

--KW 8-)
-- 
Keith Wansbrough <kw217 at cl.cam.ac.uk>
http://www.cl.cam.ac.uk/users/kw217/
University of Cambridge Computer Laboratory.



More information about the Haskell mailing list