[Haskell-cafe] Handling custom types in Takusen

Salvatore Insalaco kirby81 at gmail.com
Fri Jul 27 10:37:30 EDT 2007


2007/7/27, Bayley, Alistair <Alistair_Bayley at invescoperpetual.co.uk>:
> BTW, do you really need to marshall PackedStrings to blobs? The Sqlite
> library uses CStrings, and I assume that CString to PackedString
> marshaling is fairly efficient, so that would seem to be a better
> choice. (I have no experience of PackedStrings, so there might be good
> reasons to prefer blobs, and I'd like to know what they are.)

The main reason is that I'm working on a Sqlite back-end for Darcs,
that will be used to store file contents.
I think to choose Takusen as back-end library mainly because it has
the blob functions of Sqlite already mapped.

In Darcs PackedStrings are used to store file contents in memory. I
don't think that it would be very efficient to store files of
megabytes in a text column (there could be encoding problems too).

Also, in Sqlite 3.4, they introduced new functions for incremental
reading / writing of Blobs. I could use them in the future.

Thank you a lot for helping! I'll surely send you the patches, even if
the PackedString support will be a little Darcs-specific (I don't
think that requiring it for compiling Takusen is a good idea).

Salvatore Insalaco


More information about the Haskell-Cafe mailing list