At 14:40 1998-06-10 +0100, you wrote:
>Here's a reasonable design for exceptions in Haskell:
>* handle :: (String -> IO a) -> IO a -> IO a
You probably realized more quickly than I how this
can leak exceptions. What I mean is
main = do quotient <- handle (const (return 0)) (return (0 / 0)
-- Looks plausible
-- but the exception isn't raised yet.
print quotient -- Here the expression 0/0 is evaluated
-- and the exception is raised with no handler.
Is this considered a drawback?
--
Scott Turner
[EMAIL PROTECTED] http://www.ma.ultranet.com/~pkturner
- Re: FW: Exceptions are too return values! Simon L Peyton Jones
- RE: Exceptions are too return values! Karlsson Kent - keka
- Re: FW: Exceptions are too return values! Amr A Sabry
- Re: Exceptions are too return values! Fergus Henderson
- Re: FW: Exceptions are too return values! Fergus Henderson
- Re: Exceptions are too return values! Hans Aberg
- Re: FW: Exceptions are too return values! Alastair Reid
- Re: FW: Exceptions are too return values! Fergus Henderson
- Re: FW: Exceptions are too return values! Alastair Reid
- Re: FW: Exceptions are too return values! Carl R. Witty
- Re: FW: Exceptions are too return values! Scott Turner
- Re: FW: Exceptions are too return values! Hans Aberg
- Re: Exceptions are too return values! Hans Aberg
- Re: Exceptions are too return values! Hans Aberg
- Re: Exceptions are too return values! Fergus Henderson
- Re: Exceptions are too return values! Fergus Henderson
- Re: FW: Exceptions are too return values! Fergus Henderson
- Re: Exceptions are too return values! Dave Tweed
- Re: Exceptions are too return values! Alastair Reid
- Re: Exceptions are too return values! Fergus Henderson
- Re: Exceptions are too return values! Fergus Henderson
