System.Posix.IO.ByteString fdRead and fdWrite.
Herbert Valerio Riedel
hvr at gnu.org
Thu Nov 21 08:18:10 UTC 2013
On 2013-11-21 at 00:03:46 +0100, Ashley Yakeley wrote:
> In unix-126.96.36.199, fdRead and fdWrite in System.Posix.IO.ByteString use
> String instead of ByteString. This is wrong, isn't it? The point of
> the .ByteString modules is to do IO in ByteString.
Fwiw, here's the commit introducing the ByteString API and stating its intention:
However, I'm not totally sure from that, whether the type-sigs
fdRead :: Fd
-> ByteCount -- ^How many bytes to read
-> IO (String, ByteCount) -- ^ The bytes read, how many bytes were read.
fdWrite :: Fd -> String -> IO ByteCount
were really intended to be that way.
Simon, maybe you can provide some insight here?
More information about the Libraries