IOError vs. Exception vs. IOException

Hal Daume III hdaume@ISI.EDU
Mon, 4 Nov 2002 07:36:49 -0800 (PST)


Hi Simon, all:

Simon Marlow also wrote:
> I haven't heard
> anyone else comment so far on whether they like/dislike the current
> Exception interface... anyone?

I'm in favor, even though it breaks code.


On Mon, 4 Nov 2002, Simon Marlow wrote:

> > [redirecting to libraries]
> > Two (mostly) independent proposals:
> > 
> > 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.
> > 
> > 2) Define
> > 
> > 	type IOError = IOException	-- was Exception
> >
> >    (or vice versa), leave the type of Prelude.ioError as IOError -> IO
> a,
> >    but add to Control.Exception
> > 
> > 	throwIO :: Exception -> IO a
> > 
> > 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.
> 
> Our feeling over here is that this is an unforced change, so in
> isolation it probably wouldn't be worthwhile.  It'll break some code,
> and the awkward squad paper will have to be updated to comply (although
> we just noticed it is already wrong about the behaviour of
> Prelude.catch).
> 
> However, if there's concensus that folk would prefer the alternate
> definition of IOError, then we're happy to go along with it.
> 
> Cheers,
> 	Simon
> _______________________________________________
> Libraries mailing list
> Libraries@haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
> 

-- 
--
Hal Daume III

 "Computer science is no more about computers    | hdaume@isi.edu
  than astronomy is about telescopes." -Dijkstra | www.isi.edu/~hdaume