openFile and text mode vs. binary mode

Simon Marlow
Wed, 18 Jun 2003 09:37:11 +0100

> On Tue, Jun 10, 2003 at 10:33:53AM +0100, Simon Marlow wrote:
> > The question is: is this the interface that we want to expose from
> > System.IO?  Personally I have two criticisms: openFileEx is not a
> > particularly descriptive name, and I don't see a reason for=20
> IOMode to be
> > nested inside IOModeEx.  So I'd suggest this instead:
> >=20
> >     openBinaryFile :: FilePath -> IOMode -> IO Handle
> Perhaps openFileAs? openBinaryFile sounds a bit like it would=20
> only open it
> as a binary, whereas in fact it actually gives you the option=20
> of opening it
> either as binary or as text.

Well, my intention was that openBinaryFile would open the file as
binary, and the ordinary openFile would open it in text mode.  That is,
we would get rid of the IOModeEx type.