Why no exceptions in Haskell?

Fergus Henderson fjh@cs.mu.oz.au
Fri, 23 Nov 2001 07:12:10 +1100


On 22-Nov-2001, Keith Wansbrough <Keith.Wansbrough@cl.cam.ac.uk> wrote:
> > I am just curious: Why does Haskell not provide exceptions a la SML?
> > Why does only the IO monad allow for exceptions?
> 
> GHC certainly implements exceptions, along the lines described in
> 
>   A semantics for imprecise exceptions, Simon Peyton Jones, Alastair
>   Reid, Tony Hoare, Simon Marlow, Fergus Henderson. Proc Programming
>   Languages Design and Implementation (PLDI'99), Atlanta.

... and the main reason why Haskell 98 didn't incorporate this is because,
well, 98 was before 99 ;-). 

In other words, it wasn't well understood at the time the Haskell
report was being written.  But I think exception support along the
lines suggested in that paper and implemented in GHC is very likely to
be included in the next revision of Haskell.

That's my opinion, anyway, though of course I am somewhat
biased on this issue! ;-)

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.