IOError vs. Exception vs. IOException

Simon Peyton-Jones simonpj@microsoft.com
Mon, 4 Nov 2002 12:04:54 -0000


I'd be happy with these changes.

| -----Original Message-----
| From: Ross Paterson [mailto:ross@soi.city.ac.uk]
| Sent: 04 November 2002 09:52
| To: Simon Peyton-Jones
| Cc: Simon Marlow; Alastair Reid; libraries@haskell.org
| Subject: Re: IOError vs. Exception vs. IOException
|=20
| On Mon, Nov 04, 2002 at 08:57:06AM -0000, Simon Peyton-Jones wrote:
| >
| > | FWIW, I agree with you, and I don't have any objections to
changing it
| > | (but Simon P.J. might).
| >
| > I doubt I'd have an objection.  Want to make a concrete proposal to
the
| > libraries list?  I didn't get exactly what it was from your
messages.
|=20
| [redirecting to libraries]
| Two (mostly) independent proposals:
|=20
| 1) Move bracket and bracket_ from System.IO (or GHC.Exception) to
|    haskell98/IO.hs.  These two should now never be used anyway (except
|    in all-H98 programs), and this would save users of the new
libraries
|    from having to hide them.
|=20
| 2) Define
|=20
| 	type IOError =3D IOException	-- was Exception
|=20
|    (or vice versa), leave the type of Prelude.ioError as IOError -> IO
a,
|    but add to Control.Exception
|=20
| 	throwIO :: Exception -> IO a
|=20
| If both are done, the only overlap seen by users of the new libraries
| is Prelude.catch vs Control.Exception.catch and System.IO.try vs
| Control.Exception.try.  In each case there's a type distinction
| reflecting the semantic distinction.