On Tue, Jan 18, 2011 at 1:17 PM, John Lato <jwl...@gmail.com> wrote: >> From: Michael Snoyman <mich...@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].
My yaml package originally used iteratee, and I did not even know about enumFromCallback. Is it a recent addition? > But if you want this style of code with database access, why not try > Takusen? For one, it's easier to build an enumerator-package-based solution based on a cursor-oriented library than a library using a different type of enumerator. Also, I'm not quite sure how well the Takusen approach of using compile-time flags to determine which backends get built would work for my users. Right now, by typing "cabal install persistent-postgresql", they can be guaranteed to get all of the needed libraries, compiled in a manner which will let them actually use the database. It seems like that would not be the case with Takusen. But the third, and probably biggest, reason, is that I was already familiar with HDBC. > John L. > [1] http://hackage.haskell.org/packages/archive/iteratee/0.6.0.1/doc/html/Data-Iteratee-Iteratee.html#v:enumFromCallback Michael _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe