CouchDB 0.8.1.0 → 0.8.1.1
raw patch · 3 files changed
+6/−5 lines, 3 filesdep ~HTTP
Dependency ranges changed: HTTP
Files
- CouchDB.cabal +2/−2
- src/Database/CouchDB.hs +1/−1
- src/Database/CouchDB/Unsafe.hs +3/−2
CouchDB.cabal view
@@ -1,5 +1,5 @@ Name: CouchDB-Version: 0.8.1.0+Version: 0.8.1.1 Cabal-Version: >= 1.2.4 Copyright: Copyright (c) 2008 Arjun Guha and Brendan Hickey License: BSD3@@ -19,7 +19,7 @@ Hs-Source-Dirs: src Build-Depends:- base, mtl, containers, network, HTTP>=3001.1.4, json>=0.3.3+ base, mtl, containers, network, HTTP<4000.0.0, json>=0.3.3 ghc-options: -fwarn-incomplete-patterns Extensions:
src/Database/CouchDB.hs view
@@ -205,7 +205,7 @@ getAndUpdateDoc :: (JSON a) => DB -- ^database -> Doc -- ^document name- -> (a -> a) -- ^update function+ -> (a -> IO a) -- ^update function -> CouchMonad (Maybe Rev) -- ^If the update succeeds, -- return the revision number -- of the result.
src/Database/CouchDB/Unsafe.hs view
@@ -179,7 +179,7 @@ getAndUpdateDoc :: (JSON a) => String -- ^database -> String -- ^document name- -> (a -> a) -- ^update function+ -> (a -> IO a) -- ^update function -> CouchMonad (Maybe String) -- ^If the update succeeds, -- return the revision number -- of the result.@@ -187,7 +187,8 @@ r <- getDoc db docId case r of Just (id,rev,val) -> do- r <- updateDoc db (id,rev) (fn val)+ val' <- liftIO (fn val)+ r <- updateDoc db (id,rev) val' case r of Just (id,rev) -> return (Just $ fromJSString rev) Nothing -> return Nothing