[Haskell-cafe] Database.CouchDB broken?

Martin Hilbig martin at mhilbig.de
Sat Jul 31 05:04:21 EDT 2010


try it this way:


note the type annotations and the added req param include_docs=true for

the first error is created by ghci, since it dont know the specific type

Database.CouchDB> :t runCouchDB' $ getDoc (db "test") (doc "xyz") 
runCouchDB' $ getDoc (db "test") (doc "xyz")
   :: (JSON a) => IO (Maybe (Doc, Rev, a))

but why doesnt it complain about the ambiguous type variable `a', like
in `read "124"`?

the addition of the include_docs=true request parameter really should be
in the getAllDocs function itself.

i'll fix this and put it in my own haskell-couchdb repo, as well as the
simple bulk and attachment apis i implemented, stay tuned ;)

have fun

On 19.07.2010 19:08, Moritz Ulrich wrote:
> Hello,
> I'm currently learning Haskell and I want to write a small tool to
> collect some data in a CouchDB-Database Sadly, the Database.CouchDB
> module from hackage (and from git) seems broken. It looks like a bug
>  deep in the JSON handling of the lib.
> Some examples can be found in this gist:
> http://gist.github.com/475323 ('test' is a database with two simple
> documents, the doc with the id '8e9112011580882422393f6291000f7d'
> exists)
> I filed an issue, but the maintainer hasn't responded in 5 days. Is
> there anything I missed?
> Thanks in advance!

More information about the Haskell-Cafe mailing list