On Wed, 10 Jun 1998, Simon L Peyton Jones wrote:
| We're implementing an experimental version of this
| in GHC, integrated with the IO monad exceptions, so that
|
| handle :: (IOError -> IO a) -> IO a -> IO a
|
| and we add an extra constructor (UserError String) to the
| IOError type for exceptions raised by raise.
How about adding the following errors:
data IOError
= ...
| HeapOverflowError
| StackOverflowError
This is very useful when you for example want to implement a Hugs like
system in Haskell.
Now your Haskell programs will be very unlikely to crash!
Another question: Is "handle" strict in the following argument:
handle :: (IOError -> IO a) -> IO a -> IO a
^
(meaning: will "handle f (return bottom)" be bottom?)
Regards,
Koen.
--
Koen Claessen,
[EMAIL PROTECTED],
http://www.cs.chalmers.se/~koen,
Chalmers University of Technology.
- Re: Exceptions are too return values! S. Alexander Jacobson
- Re: Exceptions are too return values! Mariano Suarez Alvarez
- Re: Exceptions are too return values! Alex Ferguson
- Re: Exceptions are too return values! Dave Tweed
- FW: Exceptions are too return values! Karlsson Kent - keka
- Re: FW: Exceptions are too return values! Simon L Peyton Jones
- Re: FW: Exceptions are too return values! Lennart Augustsson
- Re: FW: Exceptions are too return values! Ralf Hinze
- Re: FW: Exceptions are too return values! Tommy Thorn
- Re: FW: Exceptions are too return values! S. Alexander Jacobson
- RE: Exceptions are too return values! Koen Claessen
- RE: Exceptions are too return values! Karlsson Kent - keka
- Re: FW: Exceptions are too return values! Kevin Hammond
- Re: FW: 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: FW: Exceptions are too return values! Alastair Reid
- Re: FW: Exceptions are too return values! S. Alexander Jacobson
- Re: FW: Exceptions are too return values! Fergus Henderson
- Re: FW: Exceptions are too return values! Simon L Peyton Jones
- Re: FW: Exceptions are too return values! Simon L Peyton Jones
