[Haskell-cafe] ANN: unix-bytestring 0.3.4

wren ng thornton wren at freegeek.org
Sun Mar 27 06:27:43 CEST 2011


--------------------------------------------
-- unix-bytestring 0.3.4
--------------------------------------------

The unix-bytestring package offers a full selection of 
Unix/Posix-specific functions for reading and writing ByteStrings to Fds.

--------------------------------------------
-- Changes (since 0.3.2)
--------------------------------------------

* For all the low-level functions (fd*Buf) there are now safer versions 
(tryFd*Buf) which return errors via Either Errno, instead of throwing 
IOError exceptions. These will be of particular interest to the 
maintainers of iteratee, iteratee-mtl, and liboleg.

* All the low-level functions (and the appropriate higher-level 
analogues) now check that the ByteCount or Int arguments are positive. 
If they're negative or zero then they return immediately (saying that 
zero bytes were read/written, returning an empty ByteString, etc). Note 
that this behavior is different than the functions in @unix@ which only 
check if they're equal to zero, or don't check at all.

--------------------------------------------
-- Future work
--------------------------------------------

* The readv(2) and writev(2) functions have a number of corner cases 
that throw errors (e.g., if you have too many iovecs where "too many" 
could mean >16) but these can be detected beforehand, or worked around 
by making multiple calls. Unfortunately, finding out what the limit is 
(or whether the linked version of libc does its own workarounds) is 
pretty tricky and platform-dependent. So I'll work on figure that out 
and making some safer wrappers.

--------------------------------------------
-- Links
--------------------------------------------

Homepage:
     http://code.haskell.org/~wren/

Hackage:
     http://hackage.haskell.org/package/unix-bytestring

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

Haddock (Darcs version):

http://community.haskell.org/~wren/unix-bytestring/dist/doc/html/unix-bytestring/

-- 
Live well,
~wren



More information about the Haskell-Cafe mailing list