IOError vs. Exception vs. IOException

Alastair Reid
16 Nov 2002 04:24:27 +0000

> I actually meant relax the haskell 98 spec in the quite literal
> sense of changing the spec to allow for the set of exceptions to be
> undefined.

The set of exceptions is already undefined.  The IOError type is
deliberately abstract (i.e., you can't see the constructors) so that
the set of exceptions can be extended.  (It would have been more
convenient if you could see the constructors so that you could use
pattern matching but making it extensible won out over convenience.)

But, whatever exception is used, changing the haskell98 spec so that 

  catch (print (1/0)) print

is not equal to bottom (as in the current spec) is a pretty big step.

I helped design non-determinstic exceptions and I still think the idea
is a pretty radical idea that needs more discussion and more
experience before it is added to the language.  

Alastair Reid

ps In case it sounds like I've changed my mind about non-deterministic
exceptions.  This is not so - I continue to believe that languages
without exception handling are useless toys (however beautiful) and
that ND-exceptions are the only viable way of adding exceptions to
Haskell.  What I'm saying is that I'm not sure that a concensus exists
and that there may be worthwhile minor variations on the idea that
should be explored.