ByteString-backed Handles, and another couple of questions

Duncan Coutts duncan.coutts at googlemail.com
Tue Dec 15 22:02:07 EST 2009


On Tue, 2009-12-15 at 12:48 -0800, Bryan O'Sullivan wrote:

> 
> Yes, that would amount to double-buffering, and would work nicely,
> only the current buffers go through foreign pointers while text uses
> an unpinned array. I can see why this is (so iconv can actually work),
> but it does introduce a fly into the ointment :-)

It should not be strictly necessary to use a ForeignPtr in this case. If
the IO buffers use pinned ByteArray#s then they can still be passed to
iconv for it to write into.

It should also be possible for Text to be constructed from a pinned
ByteArray#.

Duncan



More information about the Glasgow-haskell-users mailing list