-- | Put an object in Couch DB with revision, returning the new Revision.
couchPut :: (MonadCouch m, Data a) => 
       Path         -- ^ Database
    -> Path         -- ^ Document path
    -> Revision     -- ^ Document revision. For new docs provide empty string.
    -> Query        -- ^ Query arguments.
    -> a            -- ^ The object to store.
    -> m Revision      
couchPut db p = couchPutWith AG.encode (mkPath [db, p])
couchPut :: (MonadCouch m, Data a) => 
       Path         -- ^ Database
    -> Path         -- ^ Document path
    -> Revision     -- ^ Document revision. For new docs provide empty string.
    -> Query        -- ^ Query arguments.
    -> a            -- ^ The object to store.
    -> m Revision
couchPut db p = couchPutWith AG.encode (mkPath [db, p])
couchPut db p = couchPutWith AG.encode (mkPath [db, p])