|Version 3 (modified by ross@…, 10 years ago) (diff)|
In Haskell 98, exceptions may be caught and thrown only in the IO monad. The error function generates failures from pure code, but cannot be caught.
Imprecise exceptions may be thrown by pure code and caught in the IO monad. IO exceptions and error are subsumed as special cases.
- A semantics for imprecise exceptions, Simon Peyton Jones, Alastair Reid, Tony Hoare, Simon Marlow and Fergus Henderson. PLDI 1999.
- more robust programs
- implemented by GHC and Hugs for several years
- complicates denotational semantics a little
- very tricky to implement properly
- requires non-trivial run-time support and implementation constraints