Having trouble defining type correctly

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
participants (1)
-
Chris Bolton