[Haskell-cafe] databases in Haskell & type-safety

Austin Seipp mad.one at gmail.com
Sat Jan 3 05:25:12 EST 2009


Excerpts from Gour's message of Sat Jan 03 03:48:44 -0600 2009:
> Hi!
> 
> I'd like to use sqlite3 as application storage in my haskell project...
> 
> Browsing the available database options in Haskell it seems that:
> 
> a) HSQL is dead (hackage reports build-failure with 6.8 & 6.10)
> 
> b) haskelldb is also not in a good shape - build fails with 6.8 & 6.10
> 
> For Haskell-newbie as myself, it looks that haskelldb is the one which
> provide(ed)s the most secure API (I was reading draft paper about
> MetaHDBC but, apparently, the type inference support in open-source
> databases is poor and that's why, according to the author "This is
> unfortunately as it makes MetaHDBC a lot less valuable." 
> 
> What remains is:
> 
> c) Takusen which is also not up-to-date (it fails with 6.10) and
> 
> d) HDBC and sqlite bindings which are the only packages which build with
> 6.10.

Have you tried the simple sqlite3 bindings available?
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/sqlite

> I'm not familiar with Takusen which says: "Takusen's unique selling
> point is safety and efficiency..." and I would appreciate if someone
> could shed some more light to its 'safety' and the present status?

Takusen is based on the (unique) concept of a left-fold
enumerator. Having a left-fold interface guarantees timely (nearly
perfect, really) deallocation of resources while still having the
benefits of a 'lazy' stream. This interface has (as shown by Oleg and
others) proven to be very efficient in a number of cases as well as
favorable for many. The idea is very novel, and truly worth exploring
if you ask me.

For more information about left-fold enumerators and takusen, see here:

http://okmij.org/ftp/papers/LL3-collections-enumerators.txt
http://okmij.org/ftp/Haskell/fold-stream.lhs
http://okmij.org/ftp/Haskell/misc.html#takusen

NB: I have *just* (about 5 minutes ago) sent in a patch for takusen
to get it to build on GHC 6.10.1 to Oleg. Hopefully an updated version
will appear on hackage in the next few days.

Austin


More information about the Haskell-Cafe mailing list