System.Posix.IO.ByteString

Brandon Allbery allbery.b at gmail.com
Sun Jan 11 00:22:34 UTC 2015


On Sat, Jan 10, 2015 at 7:15 PM, Erik de Castro Lopo <mle+hs at mega-nerd.com>
wrote:

>     System.Posix.IO.ByteString.fdRead :: Fd -> ByteCount -> IO (String,
> ByteCount)
>
> which is identical to the one above. The ByteString in the module name
> suggests it would be using ByteString instead of String?
>
> Can anyone explain this for me?
>

The "ByteString" in the SYstem.Posix.*.ByteString modules applies to the
pathnames (POSIX pathnames are byte strings, and there's lots of ways to
cause problems if you insist on pretending that they are in any particular
encoding), not the values being read/written, so functions like that are
basically carried along just to provide a mostly compatible API.

I would expect to find functions working with ByteString values under
Data.ByteString.

-- 
brandon s allbery kf8nh                               sine nomine associates
allbery.b at gmail.com                                  ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20150110/456e9164/attachment.html>


More information about the Libraries mailing list