There was an error while loading. Please reload this page.
1 parent 3f01196 commit 0041023Copy full SHA for 0041023
src/Database/CouchDB.hs
@@ -87,6 +87,12 @@ data Rev = Rev { unRev :: JSString } deriving (Eq,Ord)
87
instance Show Rev where
88
show (Rev s) = fromJSString s
89
90
+instance JSON Rev where
91
+ readJSON (JSString s) = return (Rev s)
92
+ readJSON _ = fail "readJSON: not a valid document revision"
93
+
94
+ showJSON (Rev s) = showJSON s
95
96
-- |Document name
97
data Doc = Doc { unDoc :: JSString } deriving (Eq,Ord)
98
0 commit comments