System.Posix.IO.ByteString fdRead and fdWrite.
marlowsd at gmail.com
Thu Nov 21 10:55:36 UTC 2013
On 21/11/13 08:18, Herbert Valerio Riedel wrote:
> On 2013-11-21 at 00:03:46 +0100, Ashley Yakeley wrote:
>> In unix-184.108.40.206, 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?
Brandon's reply is correct, the ByteString variant of the POSIX API is
intended to change the representation of file paths only.
These two functions are totally useless and we need better versions anyway.
More information about the Libraries