ByteString-backed Handles, and another couple of questions

Bryan O'Sullivan bos at serpentine.com
Tue Dec 15 01:09:45 EST 2009


Hi, Simon -

I just added support to Data.Text for your new Unicode-based Handle
implementation, and I'd like to write some tests. The natural way to do this
would be to create Handles that will write to, and read from, ByteStrings.
Does any such code exist at the moment? I don't see it in base or
bytestring, though all the necessary abstractions appear to be present.

Also, the place I hooked into the new I/O machinery was at the next level up
from CharBuffer. Because the implementation of CharBuffer isn't abstract, I
had no opportunity to put a text array in there, so there's an extra amount
of copying that happens when going from byte buffer to char buffer to Text.
It's a bit of a shame, but I don't see a way around it at the moment. Would
you be interested in trying to remove that extra copy, or is the current
interface set in stone?

Many thanks for your great work on this,
Bryan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20091215/e80220fe/attachment.html


More information about the Glasgow-haskell-users mailing list