Proposal: add ByteString support to unix:System.Posix.IO API

wren ng thornton wren at
Thu Mar 3 03:38:30 CET 2011

On 3/2/11 8:49 AM, Simon Marlow wrote:
> On 28/02/2011 22:57, wren ng thornton wrote:
>> On 2/28/11 12:28 PM, Johan Tibell wrote:
>>> On Mon, Feb 28, 2011 at 9:20 AM, Bryan O'Sullivan<bos at>
>> wrote:
>>>> I think that the strict bytestring version should just replace the
>>>> current function in System.Posix.IO, and [...]
>> So then what would become of the string variants? Backwards compatibility
>> and all... not _everyone_ uses ByteStrings yet.
> The unix package is tied to GHC releases, where the usual convention is
> to DEPRECATE for one major release (~ 12 months), then remove in the
> next release.

I'm fine with that. I don't particularly care what happens to the string 
functions, I'd just like to see the bytestring versions incorporated.

But that does raise the issue: if we are to (eventually) remove the 
string versions and put the bytestring versions in situ, then how should 
the migration proceed? I'd suggest putting the functions in 
System.Posix.IO.ByteString for the interim; this has the benefit that I 
could release a compatibility library allowing people to upgrade without 
changing their GHC, if need be.

But then what happens after the interim? We can't just replace the 
deprecated string versions with the bytestring versions directly, can 
we? So would we then deprecate System.Posix.IO.ByteString (another major 
release...) or just keep it around and have System.Posix.IO re-export it?

This is part of why I wasn't suggesting to remove the string functions, 
much as we'd like people to migrate.

Live well,

More information about the Libraries mailing list