[Haskell-beginners] Having trouble defining type correctly

Chris Bolton chriskun at saikonet.org
Tue Feb 22 20:51:37 CET 2011

Ok, so here's my current code: http://paste.pocoo.org/show/342949/

My basic problem is I'm not quite sure how to define Command. When a user
calls the script they can either call add, remove, update, or query, which
all have different type signatures, which is why I need Command so it'll
pass through haskell's type checking. If I get rid of query, A definition of
{ data Command m = Save m | Rem m } seemed to work, from what I can tell,
but query screws it up, so I'm trying to define exactly what Save, Rem, etc.
should be, which I've taken directly from the MongoDB API, but it just keeps
throwing errors, as seen here: http://paste.pocoo.org/show/342924/

Also, I'm very new to haskell and programming in general, so sorry for the
possibly messy code / noobish question, but anyone have any ideas here? :P
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110222/e8d6d231/attachment.htm>

More information about the Beginners mailing list