Mk?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+, - . / 0 1 2 3 4 5 6 7 8 9 : ; < = > ? @ A B C D E "Types for interacting with CouchDB'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNone0BEMX:These represent Failure modes for making CouchDB requests.Don't understand the failure<The credentials you used do not have access to this resourceQThere was some sort of syntactic issue with the text we were attempting to parse.:We ran out of input before we succeeded in parsing a JSON F.,The thing you were looking for was not found0The name you tried to give for the DB is invalid^The server complained about the content of our request. Sounds like the library is broken. :(^The server complained about the content of our request. Sounds like the library is broken. :( <The document already exists, and without the appropriate rev The database already exists 6Result type for creating a new document in a database. /Otherwise, you do get the rev back for your doc 'In batch mode, you don't get a rev back Calls in the Explicit interface will always return a ", so we make it easy to type here.The basic type#The basic type/The basic type;The basic type?The basic data typeAPossible values for styleDPossible values of sinceGTypes of feeds available.KThe basic structureYThe basic structure]The basic structurebThe basic structureqThe basic structureThe basic structure7A typeclass for types that can be converted to headers.Performs the actual conversion@A typeclass for types that can be converted to query parameters.Performs the actual conversion(A quick type alias for query parameters.)The credentials for each CouchDB request.Many operations in CouchDB require some sort of authentication. We will store the credentials in their various forms here (though we're sticking to HTTP Basic Authentication for now).There are operations on the request that know how to modify the request appropriately depending on which credential type is in play. 5This represents the context for each CouchDB request.FThis contains all the bits that are unlikely to vary between requests.Eventually, we should have routines that are smart enough to pull this out of a suitably-set-up Monad, so you could just stash it there and forget about it. The Manager that Network.HTTP.Client5 requests require. We store it here for easy access.The host to connect toThe port to connect to6Any credentials that should be used in making requestseWe can trade credentials for a session cookie that is more efficient, this is where it can be stored.@The database that should be used for database-specific requests.The name of a userA TCP port numberThe password of a userThe name of a hostThe revision of a documentThe id of a documentThe name of a database Convert a  directly into a G Convert a  directly into a G Convert a  directly into a G Convert a  directly into a G:Pull the appropriately encoded database out of the context6Pull the appropriately encoded host out of the context6Pull the appropriately encoded port out of the context$Convert a value to a query parameterHandle converting H valuesHandle converting  valuesHandle converting  valuesHandle converting I valuesHandle converting J valuesConvert a value to a KHandle converting H valuesThe default (empty) parametersThe default (empty) parameters>The default (empty) parameters for bulk retrieval of documentsHThe default (empty) parameters for bulk creation and update of documentsThe default (empty) parametersThe default (empty) parametersConvert feed to Query Parameter Convert since to Query Parameter Convert style to Query ParameterThe default (empty) parametersConvert to query parametersdecode from JSONencode to JSONdecode from JSONencode to JSONdecode from JSONencode to JSONdecode from JSONConvert to query parameters%Convert to query parameters (partial)!Convert to HTTP Headers (partial)Convert to query parametersConvert to query parametersConvert to query parameters  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~The name of the query parameter#A function from the raw value to a G The raw valueThe name of the header#A function from the raw value to a G The raw value  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~qrstuvwxyz{|}~bcdefghijklmnop]^_`aYZ[\KLMNOPQRSTUVWXGJIHDFEACB?@;<=>/0123456789:#$%&'()*+,-. !" D    !"# $%&'()*+,-./ 0123456789:;<=>?@ACBDFEGJIHK LMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~7Code for parsing responses from Database.Couch.External'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNone3E /A type synonym for the Monad we're operating inaCheck the status code for a successful value and tries to decode to the user's desired type if so(Run a given parser over an initial value*Extract the response status from the Monad+Extract the response headers from the Monad)Extract the response value from the Monad&Check the status code for the response*Try to retrieve a header from the responseKRetrieve a header from the response, or return an error if it's not presentZDecode the Content-Length header from the response, or return an error if it's not presentOGet the document revision (ETag header), or return an error if it's not present_Get the value of a particular key from the response value, or return an error if it's not foundYDecode the response value to a particular type, or return an error if it can't be decoded GUtilities for extracting specific types from Database.Couch JSON values'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNoneEEAttempt to decode the value into anything with a FromJSON constraint.!This is really about translating   values into our  values. Attempt to construct a H value./This assumes the routine conforms to CouchDB's  {"ok": true} return convention. Attempt to construct a list of L values.6CouchDB returns uuids as string values in a form that  Data.UUIDB cannot consume directly, so we provide this standard conversion. 2Attempt to extract the value of a particular key. 4Routines for creating the Request to send to CouchDB'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNone3$A type synonym for our builder monad,The state of our request as it's being builtThe base request being built#The request itself only stores the  queryString^, so we accumulate pairs during construction, and use them to set the query string at the end.1If this is set, it will be prepended to the path.TAgain, stored this way for ease of manipulation, then properly assembled at the end.Given a 0, run our monadic builder function to produce a M.This actually takes the ? and does the assembly of the various state bits into a single M.8The default set of modifications applied to the request.+The host/port connection information is setThe Accept header is set to 'application/json'The 'Content-Type' headers is set to 'application/json'3Any authentication session in the cookie jar is set/Any Basic Authentication information is appliedAAny or all of these may be overridden, but probably shouldn't be.Choose the database for the M, based on what's in the <. This is the one thing that could arguably throw an error.2Set the appropriate authentication markers on the M, based on what's in the .Set the host and port for the M, based on what's in the .Set the  CookieJar for the M, based on what's in the .Add headers to a M), leaving existing instances undisturbed.Add headers to a M!, if they aren't already present.Set headers on the M$, overriding any existing instances.Add query parameters to a M*, leaving existing parameters undisturbed.Add query parameters to a M , if they aren't already presentSet query parameters on the M$, overriding any existing instances.Add a path segment to the M-. This is only appropriate for static paths.Add a path segment to the M , given a .Set the rev for the M.Set the rev for the M if you have it.5Set the body of the request to the encoded JSON valueSet the method for the M.The document content,The lowest low-level code for Database.Couch'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNone+Make an HTTP request returning a JSON valueThis is our lowest-level non-streaming routine. It only handles performing the request and parsing the result into a JSON value. It presumes:0we will be receiving a deserializable JSON valueRwe do not need to stream out the result (though the input is parsed incrementally)The results of parsing the stream will be handed to a routine that take the output and return the value the user ultimately desires. We use  Data.Either' to handle indicating failure and such.Basing the rest of our library on a function where all dependencies are explicit should help make sure that other bits remain portable to, say, streaming interfaces.Higher-level wrapper around Building on top of 'rawJsonRequest, this routine is designed to take a builder for the request and a parser for the result, and use them to request our transaction. This makes for a very declarative style when defining individual endpoints for CouchDB.DIn order to support more sophisticated forms of authentication than Basic, we do have to examine the cookie jar returned from the server, and perhaps tell the user that they should replace the cookie jar in their context with it.3Make a HTTP request with standard CouchDB semanticsThis builds on *, with a standard parser for the response.The Network.HTTP.Client.Manager to use for the requestThe actual request itself The builder for the HTTP request.A parser for the data type the requester seeks9A context for holding the HTTP manager and the cookie jar?Database-oriented requests to CouchDB, with explicit parameters'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNoneE Bhttp://docs.couchdb.org/en/1.6.1/api/database/common.html#head--db(Check that the requested database existsiThe return value is an object that should only contain a single key "ok", so it is easily decoded into a H with our asBool combinator:6value :: Result Bool <- Database.exists ctx >>= asBoolStatus: Complete  Ahttp://docs.couchdb.org/en/1.6.1/api/database/common.html#get--dbGet most basic meta-informationYThe return value is an object whose fields often vary, so it is most easily decoded as a F:*value :: Result Value <- Database.meta ctxStatus: Complete  Ahttp://docs.couchdb.org/en/1.6.1/api/database/common.html#put--dbCreate a databaseYThe return value is an object whose fields often vary, so it is most easily decoded as a F:*value :: Result Value <- Database.meta ctxStatus: Complete  Dhttp://docs.couchdb.org/en/1.6.1/api/database/common.html#delete--dbDelete a databaseiThe return value is an object that should only contain a single key "ok", so it is easily decoded into a H with our asBool combinator:6value :: Result Bool <- Database.delete ctx >>= asBoolStatus: Complete  Bhttp://docs.couchdb.org/en/1.6.1/api/database/common.html#post--db#Create a new document in a databaseThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a H with our asBool combinator:Ivalue :: Result Bool <- Database.createDoc True someObject ctx >>= asBoolStatus: Complete  Mhttp://docs.couchdb.org/en/1.6.1/api/database/bulk-api.html#get--db-_all_docs$Get a list of all database documents\The return value is a list of objects whose fields often vary, so it is easily decoded as a  of F:9value :: Result [Value] <- Database.allDocs dbAllDocs ctxStatus: Complete  Nhttp://docs.couchdb.org/en/1.6.1/api/database/bulk-api.html#post--db-_all_docs%Get a list of some database documents\The return value is a list of objects whose fields often vary, so it is easily decoded as a  of F:@value :: Result [Value] <- Database.someDocs ["a", "b", "c"] ctxStatus: Complete  Ohttp://docs.couchdb.org/en/1.6.1/api/database/bulk-api.html#post--db-_bulk_docs$Create or update a list of documents\The return value is a list of objects whose fields often vary, so it is easily decoded as a  of F:Kvalue :: Result [Value] <- Database.bulkDocs dbBulkDocs ["a", "b", "c"] ctxStatus: Complete   Khttp://docs.couchdb.org/en/1.6.1/api/database/changes.html#get--db-_changes(Get a list of all document modifications{This call does not stream out results; so while it allows you to specify parameters for streaming, it's a dirty, dirty lie.YThe return value is an object whose fields often vary, so it is most easily decoded as a F:-value :: Result Value <- Database.changes ctxStatus: Limited   Lhttp://docs.couchdb.org/en/1.6.1/api/database/compact.html#post--db-_compactCompact a databaseiThe return value is an object that should only contain a single key "ok", so it is easily decoded into a H with our asBool combinator:7value :: Result Bool <- Database.compact ctx >>= asBoolStatus: Complete   Qhttp://docs.couchdb.org/en/1.6.1/api/database/compact.html#post--db-_compact-ddoc:Compact the views attached to a particular design documentiThe return value is an object that should only contain a single key "ok", so it is easily decoded into a H with our asBool combinator:Gvalue :: Result Bool <- Database.compactDesignDoc "ddoc" ctx >>= asBoolStatus: Complete   Whttp://docs.couchdb.org/en/1.6.1/api/database/compact.html#post--db-_ensure_full_commit<Ensure that all changes to the database have made it to diskThe return value is an object that can hold an "instance_start_time" key, but if you don't need those values, it is easily decoded into a H with our asBool combinator:4value :: Result Bool <- Database.sync ctx >>= asBoolStatus: Complete   Qhttp://docs.couchdb.org/en/1.6.1/api/database/compact.html#post--db-_view_cleanup"Cleanup any stray view definitionsiThe return value is an object that should only contain a single key "ok", so it is easily decoded into a H with our asBool combinator:7value :: Result Bool <- Database.cleanup ctx >>= asBoolStatus: Complete  Mhttp://docs.couchdb.org/en/1.6.1/api/database/security.html#get--db-_security%Get security information for databaseThe return value is an object that has with a standard set of fields ("admin" and "members" keys, which each contain "users" and "roles"), the system does not prevent you from adding (and even using in validation functions) additional fields, so it is most easily decoded as a F:1value :: Result Value <- Database.getSecurity ctxStatus: Complete  Nhttp://docs.couchdb.org/en/1.6.1/api/database/security.html#post--db-_security%Set security information for database5The input value is an object that has with a standard set of fields ("admin" and "members" keys, which each contain "users" and "roles"), but the system does not prevent you from adding (and even using in validation functions) additional fields, so we don't specify a specific type, and you can roll your own:iThe return value is an object that should only contain a single key "ok", so it is easily decoded into a H with our asBool combinator:evalue :: Result Value <- Database.setSecurity (object [("users", object [("harry")])]) ctx >>= asBoolStatus: Complete  Qhttp://docs.couchdb.org/en/1.6.1/api/database/temp-views.html#post--db-_temp_viewCreate a temporary viewYThe return value is an object whose fields often vary, so it is most easily decoded as a F:evalue :: Result Value <- Database.tempView "function (doc) { emit (1); }" (Just "_count") Nothing ctxStatus: Complete  Ghttp://docs.couchdb.org/en/1.6.1/api/database/misc.html#post--db-_purge*Purge document revisions from the databaseThe return value is an object with two fields "purge_seq" and "purged", which contains an object with no fixed keys, so it is most easily decoded as a F:cvalue :: Result Value <- Database.purge $ DocRevMap [(DocId "junebug", [DocRev "1-1"])] Nothing ctx2However, the content of "purged" is effectively a ?B, so the output can be parsed into an (Int, DocRevMap) pair using:T(,) <$> (getKey "purge_seq" >>= toOutputType) <*> (getKey "purged" >>= toOutputType)Status: Complete  Nhttp://docs.couchdb.org/en/1.6.1/api/database/misc.html#post--db-_missing_revs3Find document revisions not present in the databaseThe return value is an object with one field "missed_revs", which contains an object with no fixed keys, so it is most easily decoded as a F:avalue :: Result Value <- Database.missingRevs $ DocRevMap [(DocId "junebug", [DocRev "1-1"])] ctx7However, the content of "missed_revs" is effectively a ?, so it can be parsed into a ? using:%getKey "missed_revs" >>= toOutputTypeStatus: Complete  Khttp://docs.couchdb.org/en/1.6.1/api/database/misc.html#post--db-_revs_diff3Find document revisions not present in the databaseYThe return value is an object whose fields often vary, so it is most easily decoded as a F:^value :: Result Value <- Database.revsDiff $ DocRevMap [(DocId "junebug", [DocRev "1-1"])] ctxStatus: Complete  Khttp://docs.couchdb.org/en/1.6.1/api/database/misc.html#get--db-_revs_limitGet the revision limit settingJThe return value is a JSON numeric value that can easily be decoded to an I:4value :: Result Integer <- Database.getRevsLimit ctxStatus: Complete  Khttp://docs.couchdb.org/en/1.6.1/api/database/misc.html#put--db-_revs_limitSet the revision limitStatus: Complete $Base bits for all _all_docs requests'Base bits for all our _compact requests0Base bits for our revision examination functions+Base bits for our revisions limit functions$Base bits for our security functions,Whether to create the document in batch modeThe document to create Parameters governing retrieval ( is an empty default) Parameters governing retrieval ( is an empty default)!List of ids documents to retrieve Parameters coverning retrieval ( is an empty default)"List of documents to add or update &Arguments governing changes contents ( is an empty default)  The " of the design document to compact  The security document contentThe text of your map function)The text of your optional reduce functionA ?# of documents and versions to purgeA ?$ of documents and versions availableA ?$ of documents and versions available#The value at which to set the limit               3Parameterized document-oriented requests to CouchDB'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNoneE3Get the size and revision of the specified documentThe return value is an object that should only contain the keys "rev" and "size", that can be easily parsed into a pair of (DocRev, Int):L(,) <$> (getKey "rev" >>= toOutputType) <*> (getKey "size" >>= toOutputType)^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete Get the specified documentYThe return value is an object whose fields often vary, so it is most easily decoded as a F:Bvalue :: Result Value <- DocBase.get "prefix" "pandas" Nothing ctx^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete (Create or replace the specified documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:`value :: Result Bool <- DocBase.put "prefix" modifyDoc "pandas" Nothing SomeValue ctx >>= asBoolStatus: Complete Delete the specified documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Yvalue :: Result Bool <- DocBase.delete "prefix" modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete Copy the specified documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Yvalue :: Result Bool <- DocBase.delete "prefix" modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete  (Construct a path in a consistent fashion!!All retrievals want to allow 304s"CAll modifications want to allow conflict recognition and parameters"The prefix to use for the document!Parameters for document retrievalThe document IDAn optional document revisionA prefix for the document ID!Parameters for document retrievalThe document IDAn optional document revisionA prefix for the document ID)The parameters for modifying the documentThe document IDAn optional document revision The documentA prefix for the document ID)The parameters for modifying the documentThe document IDAn optional document revisionA prefix for the document ID)The parameters for modifying the documentThe document IDAn optional document revisionThe destination document ID A prefix for the document IDThe document ID!A prefix for the document IDThe document IDAn optional document revision"A prefix for the document ID)The parameters for modifying the documentThe document IDAn optional document revision !" !" !"FDesign Document-oriented requests to CouchDB, with explicit parameters'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNoneE # Ohttp://docs.couchdb.org/en/1.6.1/api/document/common.html#head--db-_design-ddoc:Get the size and revision of the specified design documentThe return value is an object that should only contain the keys "rev" and "size", that can be easily parsed into a pair of (DocRev, Int):L(,) <$> (getKey "rev" >>= toOutputType) <*> (getKey "size" >>= toOutputType)^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete $ Nhttp://docs.couchdb.org/en/1.6.1/api/document/common.html#get--db-_design-ddoc!Get the specified design documentYThe return value is an object whose fields often vary, so it is most easily decoded as a  :8value :: Result Value <- Design.get "pandas" Nothing ctx^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete % Nhttp://docs.couchdb.org/en/1.6.1/api/document/common.html#put--db-_design-ddoc/Create or replace the specified design documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Vvalue :: Result Bool <- Design.put modifyDoc "pandas" Nothing SomeValue ctx >>= asBoolStatus: Complete & Qhttp://docs.couchdb.org/en/1.6.1/api/document/common.html#delete--db-_design-ddoc$Delete the specified design documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Ovalue :: Result Bool <- Design.delete modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete ' Ohttp://docs.couchdb.org/en/1.6.1/api/document/common.html#copy--db-_design-ddoc"Copy the specified design documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Ovalue :: Result Bool <- Design.delete modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete ( Phttp://docs.couchdb.org/en/1.6.1/api/ddoc/common.html#get--db-_design-ddoc-_info$Get information on a design documentYThe return value is an object whose fields often vary, so it is most easily decoded as a  :1value :: Result Value <- Design.info "pandas" ctxStatus: Complete ) Thttp://docs.couchdb.org/en/1.6.1/api/ddoc/views.html#get--db-_design-ddoc-_view-view$Get a list of all database documentsYThe return value is an object whose fields often vary, so it is most easily decoded as a  :Ivalue :: Result Value <- Design.allDocs viewParams "pandas" "counter" ctxStatus: Complete * Uhttp://docs.couchdb.org/en/1.6.1/api/ddoc/views.html#post--db-_design-ddoc-_view-view%Get a list of some database documentsYThe return value is an object whose fields often vary, so it is most easily decoded as a  :Uvalue :: Result Value <- Design.someDocs viewParams "pandas" "counter" ["a", "b"] ctxStatus: Complete +Base bits for all view queries #Parameters for the HEAD requestThe ID of the design documentA desired revision$Parameters for the HEAD requestThe ID of the design documentA desired revision%Parameters for the requestThe ID of the design documentA desired revision&Parameters for the requestThe ID of the design documentA desired revision'Parameters for the requestThe ID of the design documentA desired revision(The ID of the design document)Parameters for the requestThe ID of the design documentThe ID of the view*Parameters for the requestThe ID of the design documentThe ID of the view$The IDs of the documents of interest+ #$%&'()*+ #$%&'()*+ #$%&'()*+ ?Document-oriented requests to CouchDB, with explicit parameters'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNoneE, Hhttp://docs.couchdb.org/en/1.6.1/api/document/common.html#head--db-docid3Get the size and revision of the specified documentThe return value is an object that should only contain the keys "rev" and "size", that can be easily parsed into a pair of (DocRev, Int):L(,) <$> (getKey "rev" >>= toOutputType) <*> (getKey "size" >>= toOutputType)^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete - Ghttp://docs.couchdb.org/en/1.6.1/api/document/common.html#get--db-docidGet the specified documentYThe return value is an object whose fields often vary, so it is most easily decoded as a  :5value :: Result Value <- Doc.get "pandas" Nothing ctx^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete . Ghttp://docs.couchdb.org/en/1.6.1/api/document/common.html#put--db-docid(Create or replace the specified documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Wvalue :: Result Bool <- DocBase.put modifyDoc "pandas" Nothing SomeValue ctx >>= asBoolStatus: Complete / Jhttp://docs.couchdb.org/en/1.6.1/api/document/common.html#delete--db-docidDelete the specified documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Yvalue :: Result Bool <- DocBase.delete "prefix" modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete 0 Hhttp://docs.couchdb.org/en/1.6.1/api/document/common.html#copy--db-docidCopy the specified documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Yvalue :: Result Bool <- DocBase.delete "prefix" modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete ,!Parameters for document retrievalThe document IDAn optional document revision-!Parameters for document retrievalThe document IDAn optional document revision.!Parameters for modifying documentThe document IDAn optional document revision The document/!Parameters for modifying documentThe document IDAn optional document revision0!Parameters for modifying documentThe document IDAn optional document revisionThe destination document Id,-./0,-./0,-./0 +Local document-oriented requests to CouchDB'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNoneE1 Dhttp://docs.couchdb.org/en/1.6.1/api/local.html#get--db-_local-docid Get the specified local documentYThe return value is an object whose fields often vary, so it is most easily decoded as a  :5value :: Result Value <- Doc.get "pandas" Nothing ctx^If the specified DocRev matches, returns a JSON Null, otherwise a JSON value for the document.Status: Complete 2 Dhttp://docs.couchdb.org/en/1.6.1/api/local.html#put--db-_local-docid.Create or replace the specified local documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Wvalue :: Result Bool <- DocBase.put modifyDoc "pandas" Nothing SomeValue ctx >>= asBoolStatus: Complete 3 Ghttp://docs.couchdb.org/en/1.6.1/api/local.html#delete--db-_local-docid#Delete the specified local documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Yvalue :: Result Bool <- DocBase.delete "prefix" modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete 4 Ehttp://docs.couchdb.org/en/1.6.1/api/local.html#copy--db-_local-docid!Copy the specified local documentThe return value is an object that can hold "id" and "rev" keys, but if you don't need those values, it is easily decoded into a  with our asBool combinator:Yvalue :: Result Bool <- DocBase.delete "prefix" modifyDoc "pandas" Nothing ctx >>= asBoolStatus: Complete 1!Parameters for document retrievalThe document IDAn optional document revision2$Parameters for document modificationThe document IDAn optional document revision The document3$Parameters for document modificationThe document IDAn optional document revision4$Parameters for document modificationThe document IDAn optional document revisionThe destination document ID123412341234 =Server-oriented requests to CouchDB, with explicit parameters'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNone 5 =http://docs.couchdb.org/en/1.6.1/api/server/common.html#get--Get most basic meta-informationYThe return value is an object whose fields often vary, so it is most easily decoded as a  :(value :: Result Value <- Server.meta ctxStatus: Complete 6 Jhttp://docs.couchdb.org/en/1.6.1/api/server/common.html#get--_active_tasksGet a list of active tasks\The return value is a list of objects whose fields often vary, so it is easily decoded as a  of  :1value :: Result [Value] <- Server.activeTasks ctxStatus: Complete 7 Ehttp://docs.couchdb.org/en/1.6.1/api/server/common.html#get--_all_dbsGet a list of all databasesMThe return value is a list of database names, so it is easily decoded into a  of J:+value :: Result [Text] <- Server.allDbs ctxStatus: Complete 8 Hhttp://docs.couchdb.org/en/1.6.1/api/server/common.html#get--_db_updates!Get a list of all database eventsLThis call does not yet stream out results, so it's functionality is limited.UThe return value is a list of database update events, so it is easily decoded into a  of  :/value :: Result [Value] <- Server.dbUpdates ctxStatus: Limited 9 Ahttp://docs.couchdb.org/en/1.6.1/api/server/common.html#get--_log Get the log output of the serverRThis call doesn't return a JSON result, so we're deferring support for the moment.Status:  Unimplemented : Hhttp://docs.couchdb.org/en/1.6.1/api/server/common.html#post--_replicate2Administer replication for databases on the serverpWe do not yet have a structure for specifying parameters to this call, so we're deferring support for the momentStatus:  Unimplemented ; Fhttp://docs.couchdb.org/en/1.6.1/api/server/common.html#post--_restartRestart the serveriThe return value is an object that should only contain a single key "ok", so it is easily decoded into a  with our asBool combinator:5value :: Result Bool <- Server.restart ctx >>= asBoolStatus: Complete < Chttp://docs.couchdb.org/en/1.6.1/api/server/common.html#get--_statsGet server statisticsYThe return value is an object whose fields often vary, so it is most easily decoded as a  :)value :: Result Value <- Server.stats ctxStatus: Complete = Chttp://docs.couchdb.org/en/1.6.1/api/server/common.html#get--_uuidsGet a batch of UUIDsWThe return value is a list of strings representing UUIDs, so it is easily decoded as a  of  with our asUUID combinator:5value :: Result [UUID] <- Server.stats ctx >>= asUUIDStatus: Complete 56789:;<= How many UUID s to retrieve 56789:;<= 56789:;<= 56789:;<= HRequests for handling configuration of CouchDB, with explicit parameters'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIXNone> Khttp://docs.couchdb.org/en/1.6.1/api/server/configuration.html#get--_config$Get the overall server configurationYThe return value is an object whose fields often vary, so it is most easily decoded as a  :1value :: Result Value <- Configuration.server ctxStatus: Complete ? Shttp://docs.couchdb.org/en/1.6.1/api/server/configuration.html#get--_config-section%Get the configuration for one sectionYThe return value is an object whose fields often vary, so it is most easily decoded as a  :9value :: Result Value <- Configuration.section "auth" ctxStatus: Complete @ Shttp://docs.couchdb.org/en/1.6.1/api/server/configuration.html#get--_config-section"Get the configuration for one item\The return value is a JSON Value whose fields often vary, so it is most easily decoded as a  :@value :: Result Value <- Configuration.getValue "auth" "ssl" ctxStatus: CompleteA Shttp://docs.couchdb.org/en/1.6.1/api/server/configuration.html#get--_config-section(Set the configuration value for one itemBThe value to set must be something that can be translated to JSON.\The return value is a JSON Value whose fields often vary, so it is most easily decoded as a  :Evalue :: Result Value <- Configuration.setValue "auth" "ssl" Bool ctxStatus: Complete B Shttp://docs.couchdb.org/en/1.6.1/api/server/configuration.html#get--_config-section+Remove the configuration value for one item Returns the previous JSON Value.\The return value is a JSON Value whose fields often vary, so it is most easily decoded as a  :@value :: Result Value <- Configuration.delValue "auth" "ssl" ctxStatus: Complete C!Base path for all config requestsD"Base path for all section requestsEBase path for all item requests>? Section name@ Section nameKey nameA Section nameKey nameValueB Section nameKey nameCD Section nameE Section nameKey name>?@ABCDE>?@ABCDE>?@ABCDEAn overview of the Explicit interface'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIX Safe-InferredAn overview of the package'Copyright (c) 2015, Michael Alan DormanMITmdorman@jaunder.io experimentalPOSIX Safe-InferredN !"#$%&'())*+,-./0123456789:;<<=>?@ABCDEFGGHIJKLMNOPQRRSTUUVWXYZ[\]^_``abcdefghijklmmnoppqrsttuvwxyz{|}~      !"# $  %           & ' ( ) * + , - . / 0 1 2 3 4 56789:;<;<=>?@ABCDEFGHIcouch-simple-0.0.1.0Database.Couch.TypesDatabase.Couch.ResponseParserDatabase.Couch.ResponseDatabase.Couch.RequestBuilderDatabase.Couch.Internal Database.Couch.Explicit.DatabaseDatabase.Couch.Explicit.DocBaseDatabase.Couch.Explicit.DesignDatabase.Couch.Explicit.DocDatabase.Couch.Explicit.LocalDatabase.Couch.Explicit.Server%Database.Couch.Explicit.Configuration Data.AesonResult Data.ListList dbAllDocs dbBulkDocs dbChanges Data.BoolBoolValue Data.UUIDUUIDDatabase.Couch.ExplicitDatabase.CouchErrorUnknown Unauthorized ParseFailParseIncompleteNotFound InvalidNameImplementationError HttpErrorConflict AlreadyExists CreateResultWithRevNoRev ViewParams vpAttachmentsvpAttEncodingInfo vpConflicts vpDescendingvpEndKey vpEndKeyDocIdvpGroup vpGroupLevel vpIncludeDocsvpInclusiveEndvpKeyvpLimitvpReducevpSkipvpStale vpStartKeyvpStartKeyDocId vpUpdateSeq ViewIndexInfoviCompactRunning viDataSize viDiskSize viLanguage viPurgeSeq viSignature viUpdateSeqviUpdaterRunningviWaitingClientsviWaitingCommit DesignDocddocIdddocRev ddocLanguage ddocOptions ddocFilters ddocLists ddocShows ddocUpdatesddocValidation ddocViewsViewSpecvsMapvsReduce DocRevMap StyleType StyleMainStyleAll SinceTypeSinceNowFeedTypeLongpoll EventSource Continuous RetrieveDocdgdAttachmentsdgdAttEncodingInfo dgdAttsSince dgdConflictsdgdDeletedConflicts dgdLatest dgdLocalSeqdgdMeta dgdOpenRevsdgdRevdgdRevs dgdRevsInfo ModifyDoc dpFullCommitdpBatch DbBulkDocsbdAllOrNothing bdFullCommit bdNewEdits DbAllDocs adConflicts adDescendingadEndKey adEndKeyDocId adIncludeDocsadInclusiveEndadKeyadLimitadSkipadStale adStartKeyadStartKeyDocId adUpdateSeq DbChangescDocIds cConflicts cDescendingcFeedcFilter cHeartBeat cIncludeDocs cAttachmentscAttEncodingInfo cLastEventcSincecStylecTimeoutcView DbUpdatesfeedtimeOut heartBeat ToHTTPHeaders toHTTPHeadersToQueryParameterstoQueryParametersQueryParameters CredentialsBasiccredUsercredPassContext ctxManagerctxHostctxPortctxCred ctxCookiesctxDbUser unwrapUserPort unwrapPortPasswordunwrapPasswordHost unwrapHostDocRev unwrapDocRevDocId unwrapDocIdDbunwrapDbreqDocId reqDocRev reqPasswordreqUserreqDbreqHostreqPorttoQPboolToQP docIdToQP docRevToQPintToQPtextToQPtoHHboolToHHdbUpdatesParamdbChangesParam modifyDoc retrieveDoc feedTypeToQP sinceTypeToQP styleTypeToQP viewParams$fToQueryParametersViewParams$fFromJSONViewIndexInfo$fToJSONDesignDoc$fFromJSONDesignDoc$fToJSONViewSpec$fFromJSONViewSpec$fToJSONDocRevMap$fFromJSONDocRevMap$fToQueryParametersRetrieveDoc$fToQueryParametersModifyDoc$fToHTTPHeadersModifyDoc$fToQueryParametersDbAllDocs$fToQueryParametersDbChanges$fToQueryParametersDbUpdatesResponseParser standardParserunParseresponseStatusresponseHeaders responseValuecheckStatusCodemaybeGetHeader getHeadergetContentLength getDocRevgetKey toOutputType asAnythingasBoolasUUIDRequestBuilder BuilderState bsRequest bsQueryParambsDbbsPathSegments runBuilderfinalizedefaultRequestselectDbsetAuth setConnection setCookieJar addHeadersdefaultHeaders setHeaders addQueryParamdefaultQueryParam setQueryParamaddPath selectDocaddRev maybeAddRev setJsonBody setMethodrawJsonRequeststructureRequeststandardRequestexistsmetacreatedelete createDocallDocssomeDocsbulkDocschangescompactcompactDesignDocsynccleanup getSecurity setSecuritytempViewpurge missingRevsrevsDiff getRevsLimit setRevsLimit allDocsBase compactBase docRevBase revsLimitBase securityBasegetputcopydocPath accessBasemodBaseinfoviewBase activeTasksallDbs dbUpdateslog replicaterestartstatsuuidsserversectiongetValuesetValuedelValue configPath sectionPathitemPath aeson-0.9.0.1Data.Aeson.Types.Internalbytestring-0.10.4.0Data.ByteString.Internal ByteStringghc-prim GHC.TypesInt text-1.2.1.3Data.Text.InternalTexthttp-types-0.8.6Network.HTTP.Types.HeaderHeaderuuid-types-1.0.2Data.UUID.Types.Internalhttp-client-0.4.21Network.HTTP.Client.TypesRequest