unix-bytestring v0.3.0

wren ng thornton wren at freegeek.org
Tue Mar 8 02:22:43 CET 2011


On 3/7/11 5:52 PM, wren ng thornton wrote:
> On 3/6/11 12:22 PM, Bas van Dijk wrote:
>> It would be great if you could analyse the direct reverse dependencies
>> of unix to see how much fdRead is used and how much work it is to
>> adapt packages to an fdRead which only returns the ByteString:
>>
>> http://bifunctor.homelinux.net/~roel/cgi-bin/hackage-scripts/revdeps/unix-2.4.2.0#direct
>
> What an excellent idea!
>
> [...]
>
> Thus, I conclude, nobody wants the ByteCount. The switch from String to
> ByteString would involve far more work than correcting literally a
> couple pattern matches per affected project. And less than half a dozen
> use sites across all of Hackage might consider calling BS.length to get
> at the information.
>
> Of the local definitions there were two classes I noticed.
>
> * The HFuse project defines their own bindings to the pread(2) and
> pwrite(2) functions, thus answering my question about whether anyone'd
> want them. They use them as handling ByteString buffers too, no less!

Adding these into the mix, I submit v0.3.0:

     darcs get http://community.haskell.org/~wren/unix-bytestring/

I've greatly fleshed out the functions in System.Posix.IO.ByteString:

 
http://community.haskell.org/~wren/unix-bytestring/dist/doc/html/unix-bytestring/System-Posix-IO-ByteString.html

Still no versions which return (Either Errno _) instead of throwing 
exceptions, but most of the rest is there. If anyone else has 
suggestions, feel free to let me know. There's starting to be enough 
there that it might be worth throwing it up on Hackage; so much for a 
simple patch to @unix@ :)

-- 
Live well,
~wren



More information about the Libraries mailing list