System.Posix.IO.ByteString

John Lato jwlato at gmail.com
Sun Jan 11 17:13:38 UTC 2015


The naming collision is unfortunate, but solvable with the PackageImports
extension.

On 06:15, Sun, Jan 11, 2015 Antoine Latter <aslatter at gmail.com> wrote:

> The 'unix-bytestring' package looks like it can read a ByteString from the
> file descriptor once you have it open:
>
>
> http://hackage.haskell.org/package/unix-bytestring-0.3.7.2/docs/System-Posix-IO-ByteString.html
>
> Sadly both 'unix' and 'unix-bytestring' define a module named
> 'System.Posix.IO.ByteString', and you need functionality from both to get
> your job done - 'openFd' from 'unix' and then 'fdRead' from
> 'unix-bytestring'.
>
> On Sun Jan 11 2015 at 7:18:30 AM Herbert Valerio Riedel <hvr at gnu.org>
> wrote:
>
>> On 2015-01-11 at 01:22:34 +0100, Brandon Allbery wrote:
>>
>> [...]
>>
>> > 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.
>>
>> However those take [Char] as FilePath argument... where would you look
>> if you wanted to functions that used ByteStrings for both, filepaths and
>> content?
>>
>> Cheers,
>>   hvr
>> _______________________________________________
>> Libraries mailing list
>> Libraries at haskell.org
>> http://www.haskell.org/mailman/listinfo/libraries
>>
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/libraries/attachments/20150111/37a895d0/attachment.html>


More information about the Libraries mailing list