
On 5 March 2011 13:30, wren ng thornton
This currently consists of: * System.Posix.IO.ByteString * fdRead -- like System.Posix.IO.fdRead, the same as before.
What about changing this: fdRead :: Fd -> ByteCount -> IO (ByteString, ByteCount) to this: fdRead :: Fd -> ByteCount -> IO ByteString I agree that it's nice to be consistent with the String version but since that version might go away and since the length (O(1)) of the ByteString should always equal the ByteCount I think it's better to remove that invariant.
* System.Posix.IO.ByteString.Lazy -- I'm keeping this around for now, for my own convenience. * fdRead -- simple wrapper around System.Posix.IO.ByteString.fdRead, the same as before.
Although calculating the length of a lazy ByteString is O(n/c), since you always return a single chunk I think the same argument applies here. Nice work! Bas