System.IO.latin1 docs

Henning Thielemann lemming at
Tue Jan 4 16:03:34 CET 2011

Simon Marlow schrieb:
> On 27/12/2010 17:51, Ross Paterson wrote:
>> 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.
> Good plan.  I'll make a proposal to add System.IO.binary.  A different
> type for binary handles is the right thing, but it's a larger
> undertaking so I don't plan to attack it right now (someone else is
> welcome to do so).

Isn't this also the purpose of the safer-file-handles package?

More information about the Libraries mailing list