[Haskell-cafe] Re: HDBC, character encoding

Bryan O'Sullivan bos at serpentine.com
Fri Apr 4 12:59:19 EDT 2008

John Goerzen wrote:

> I've looked at the Data.ByteString.Internal API, and it looks like
> that ought to work.  Oddly, the Data.ByteString.Lazy.Internal API does
> not seem to export enough to work with it in FFI.

It doesn't usually make sense to use lazy ByteStrings directly with the
FFI.  Most often, you'll work with the strict chunks, and wrap them up.

One exception would be for C functions that let you do scatter/gather
I/O, such as writev.  You'd still be dealing with strict chunks when
calling the function, but the wrapper API might expose a lazy interface.


More information about the Haskell-Cafe mailing list