From: Michael Snoyman <michael@snoyman.com>

> I took a quick look at the enumerators library, but it doesn't seem to have
> the necessary support for handling data that comes from arbitrary C API
> function calls rather than handles or sockets.

It does support this, for prior art see yaml[1] or yajl-enumerator[2].
I'd be happy to help you with this, as having some enumerator
experience is a big help here.

This is one of the things that iteratee supports rather better than enumerator, IMHO.  See "enumFromCallback"[1].

But if you want this style of code with database access, why not try Takusen?

John L.

[1] http://hackage.haskell.org/packages/archive/iteratee/0.6.0.1/doc/html/Data-Iteratee-Iteratee.html#v:enumFromCallback