System.IO.latin1 docs

Ross Paterson ross at
Mon Dec 27 18:51:22 CET 2010

On Mon, Dec 27, 2010 at 09:04:41AM -0800, Mark Lentczner wrote:
> On Dec 25, 2010, at 7:34 AM, Wolfgang Jeltsch wrote:
> > The documentation of hSetBinaryMode says:
> > 
> >    This has the same effect as calling hSetEncoding with latin1,
> >    together with hSetNewlineMode with noNewlineTranslation.
> > 
> > It seems that this sentence is wrong.
> It seems wrong to me in intent. When a handle is in "binary" mode, it shouldn't have any encoding. If things were different, I'd want to propose that doing String I/O to such handles should fail, and that you should only be able to use ByteString with them. But I suppose that isn't viable...

That sounds like a very good idea.  Even better, flag this error at
compile time by having a different type for unencoded handles.

More information about the Libraries mailing list