[Haskell-cafe] Handling custom types in Takusen

Salvatore Insalaco kirby81 at gmail.com
Fri Jul 27 11:06:42 EDT 2007

2007/7/27, Bayley, Alistair <Alistair_Bayley at invescoperpetual.co.uk>:
> > Also, in Sqlite 3.4, they introduced new functions for incremental
> > reading / writing of Blobs. I could use them in the future.
> Seems reasonable. I recall Oleg saying something privately a while ago
> about an API for large objects. He may have some ideas for this.

A good idea could be to do the marshalling / unmarshalling of Blob as
CStringLen. It can then be used to construct PackedStrings and
ByteStrings in O(1), or doing some custom computations with it. A
CStringLen, even if contains Ptr CChar, can easily be converted to any
pointer type.

Another idea could be using custom bind function for blobs, but the
first solution is surely easier.


More information about the Haskell-Cafe mailing list