Ok, so here&#39;s my current code: <a href="http://paste.pocoo.org/show/342949/">http://paste.pocoo.org/show/342949/</a><br><br>My basic problem is I&#39;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&#39;ll pass through haskell&#39;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&#39;m trying to define exactly what Save, Rem, etc. should be, which I&#39;ve taken directly from the MongoDB API, but it just keeps throwing errors, as seen here: <a href="http://paste.pocoo.org/show/342924/">http://paste.pocoo.org/show/342924/</a><br>
<br>Also, I&#39;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