t;+      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()* Safe-InferedcPool of maximum N resources. Resources may expire on their own or be killed. Resources will initially be created on demand up N resources then recycled in random fashion. N may be changed by resizing the pool. Random is preferred to round-robin to distribute effect of pathological use cases that use every Xth resource the most and N is a multiple of X.  Resources *must* close/(kill themselves when garbage collected ( relies on this). [Creator, destroyer, and checker of resources of type r. Creator may throw error or type e. 8Create new pool of initial max size, which must be >= 1 VReturn a random live resource in pool or create new one if expired or not yet created current max size of pool resize max size of pool. When shrinking some resource will be dropped without closing since they may still be in use. They are expected to close themselves when garbage collected. AKill all resources in pool so subsequent access creates new ones      Safe-Infered%Thread-safe and pipelined connection *An IO sink and source where value of type o are sent and values of type i are received. IO monad with explicit error 2Create new Pipeline over given handle. You should  pipeline when finished, which will also close handle. If pipeline is not closed but eventually garbage collected, it will be closed along with handle. %Close pipe and underlying connection QSend message to destination; the destination must not response (otherwise future 2s will get these responses instead of their own). 0 Throw IOError and close pipeline if send fails 'Send message to destination and return promise of response from one message only. The destination must reply to the message (otherwise promises will have the wrong responses in them). R Throw IOError and closes pipeline if send fails, likewise for promised response.    Safe-Infered8MonadIO with extra Applicative and Functor superclasses EA monadic sort implementation derived from the non-monadic one in ghc' s Prelude $Randomly shuffle items in list %GRepeatedy execute action, collecting results, until it returns Nothing &_Apply action to elements one at a time until one succeeds. Throw last error if all fail. Throw + error if list is empty. '|Apply action to elements one at a time until one succeeds. Throw last error if all fail. Throw given error if list is empty )3lift IOE monad to ErrorT monad over some MonadIO m *DRun action while catching explicit error and rethrowing in IO monad +2Change or insert value of key in association list ,bit-or all numbers together -=Concat first and second together with period in between. Eg. "hello" <.> "world" = " hello.world" .Is field's value a 1 or True (MongoDB use both Int and Bools for truth values). Error if field not in document or field not a Num or Bool. /yRead N bytes from hande, blocking until all N bytes are read. If EOF is reached before N bytes then raise EOF exception. 0aHexadecimal string representation of a byte string. Each byte yields two hexadecimal characters. 1,Two char hexadecimal representation of byte  !"#$%&'()*+,-./01, !"#$%&'()*+,-./01 !"#$%&'()*+,-./01 !"#$%&'()*+,-./01, Safe-Infered6`For backward compatability: Set when the server supports the AwaitData query option. if it doesn'?t, a replica slave client should sleep a little between getMore's 76Query error. Returned with one document containing an $err" field holding the error message. 8eSet when getMore is called but the cursor id is not valid at the server. Returned with zero results. 9/A reply is a message received in response to a E <0 = cursor finished @[Get partial results from a _mongos_ if some shards are down, instead of throwing an error. AUse with TailableCursor. If we are at the end of the data, block for a while rather than returning no data. After a timeout period, we do return as normal. = | Exhaust -- ^ Stream the data down full blast in multiple more packages, on the assumption that the client will fully read all data queried. Faster when you are pulling a lot of data and know you want to pull it all down. Note: the client is not allowed to not read all the data unless it closes the connection. ; Exhaust commented out because not compatible with current  implementation BThe server normally times out idle cursors after 10 minutes to prevent a memory leak in case a client forgets to close a cursor. Set this option to allow a cursor to live forever until it is closed. CRAllow query of replica slave. Normally these return an error except for namespace local. DnTailable means cursor is not closed when the last data is retrieved. Rather, the cursor marks the final object'ss position. You can resume using the cursor later, from where it was located, if more data were received. Like any  latent cursor, the cursor may become invalid at some point  for example if the final object it references were deleted. Thus, you should be prepared to requery on CursorNotFound exception. E+A request is a message that is sent with a 9 expected in return M-Number of initial matching documents to skip NThe number of document to return in each batch response from the server. 0 means use Mongo default. Negative means close cursor after first batch and use absolute value as batch size. O[]& = return all documents in collection P[] = return whole document SIf set, the database will remove only the first matching document in the collection. Otherwise all matching documents will be removed UsIf set, the database will update all matching objects in the collection. Otherwise only updates first matching doc VjIf set, the database will insert the supplied object into the collection if no matching document is found XIf set, the database will not stop processing a bulk insert if one fails (eg due to duplicate IDs). This makes bulk insert behave similarly to a series of single inserts, except lastError will be set if any insert fails, not just the last one. (new in 1.9.1) Y1A notice is a message that is sent with no reply iBDatabase name and collection name with period (.) in between. Eg. "myDb.myCollection" j3Thread-safe TCP connection with pipelined requests kCreate pipe over handle l_Send notices as a contiguous batch to server with no reply. Throw IOError if connection fails. mSend notices and request as a contiguous batch to server and return reply promise, which will block when invoked until reply arrives. This call and resulting promise will throw IOError if connection fails. >23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno>23456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno>ijklmYe`\Zfghabcd]^_[WXTVURSQEJFKLMNOPGHI?DCBA@9:;<=>5876432no23458769:;<=>?DCBA@E JFKLMNOPGHIQRSTVUWXYe`\Zfghabcd]^_[ijklmnoNonebpAA command is a special query or action against the database. See  ,http://www.mongodb.org/display/DOCS/Commands for details. qJResult of running a MapReduce has some stats besides the output. See http:www.mongodb.orgdisplayDOCS/ MapReduce#MapReduce-Resultobject s;Leave old data but combine entries with the same key via MR's reduce function tELeave old data but overwrite entries with the same key with new data u0Clear all old data and replace it with new data wqWrite results to given collection, in other database if specified. Follow merge policy when entry already exists xReturn results directly instead of writing them to an output collection. Results must fit within 16MB limit of a single document y(key, value) -> final_valuep. A finalize function may be run after reduction. Such a function is optional and is not necessary for many map/]reduce cases. The finalize function takes a key and a value, and returns a finalized value. z (key, [value] ) -> value. The reduce function receives a key and an array of values and returns an aggregate result value. The MapReduce engine may invoke reduce functions iteratively; thus, these functions must be idempotent. That is, the following must hold for your reduce function: reduce(k, [reduce(k,vs)]) == reduce(k,vs). If you need to perform an operation only once, use a finalize function. The output of emit (the 2nd param) and reduce should be the same format to make iterative reduce possible. { () -> void+. The map function references the variable thisK to inspect the current object under consideration. The function must call emit(key,value)O at least once, but may be invoked any number of times, as may be appropriate. |Maps every document in collection to a list of (key, value) pairs, then for each unique key reduces all its associated values to a single result. There are additional parameters that may be set to tweak this basic operation.  This implements the latest version of map-reduce that requires MongoDB 1.7.4 or greater. To map-reduce against an older server use runCommand directly as described in http:www.mongodb.orgdisplayDOCS/ MapReduce. 6Operate on only those documents selected. Default is [] meaning all documents.  Default is [] meaning no sort Default is 0 meaning no limit NOutput to a collection with a certain merge policy. Default is no collection (x). Note, you don'1t want this default if your result set is large. HFunction to apply to all the results when finished. Default is Nothing. 5Variables (environment) that can be accessed from mapreducefinalize. Default is []. <Provide statistics on job execution time. Default is False. !Fields to group by, or function ( doc -> key) returning a  key object to be used as the grouping key. Use KeyF instead of Key to specify a key that is not an existing member of the object (or, to access embedded members). KGroups documents in collection by key then reduces (aggregates) each group Fields to group by (doc, agg) -> (). The reduce function reduces (aggregates) the objects iterated. Typical operations of a reduce function include summing and counting. It takes two arguments, the current document being iterated over and the aggregation value, and updates the aggregate value. agg/. Initial aggregation value supplied to reduce 9Condition that must be true for a row to be considered. [] means always true. agg -> () | result. An optional function to be run on each item in the result set just before the item is returned. Can either modify the item (e.g., add an average field given a count and a total) or return a replacement object (returning a new object with just _id and average fields). &Iterator over results of a query. Use  to iterate or  to get all results. A cursor is closed when it is explicitly closed, all results have been read from it, garbage collected, or not used for over 10 minutes (unless B option was specified in )). Reading from a closed cursor raises a . Note, a cursor is not closed when the pipe is closed, so you can open another pipe to the same server and continue using the cursor. dThe number of document to return in each batch response from the server. 0 means use Mongo default. <Fields to sort by. Each one is associated with 1 or -1. Eg. ["x" =: 1, "y" =: -1] means sort by x ascending then y descending Maximum number of documents to return, i.e. cursor will close after iterating over this number of documents. 0 means no limit. 9Fields to return, analogous to the select clause in SQL. []6 means return whole document (analogous to * in SQL). ["x" =: 1, "y" =: 1] means return only x and y fields of each document. ["x" =: 0] means return all fields except x. Use M to create a basic query with defaults, then modify if desired. For example, (select sel col) {limit = 10}  Default = [] [] = all fields. Default = [] :Number of initial matching documents to skip. Default = 0 AMaximum number of documents to return, 0 = no limit. Default = 0 Sort results by this order, [] = no sort. Default = [] xIf true assures no duplicates are returned, or objects missed, which were present at both the start and end of the query's execution (even if the object were updated). If an object is new during the query, or deleted during the query, it may or may not be returned, even with snapshot mode. Note that short query responses (less than 1MB) are always effectively snapshotted. Default = False pThe number of document to return in each batch response from the server. 0 means use Mongo default. Default = 0 "Force MongoDB to use this index, [] = no hint. Default = [] /Update operations on fields in a document. See  Hhttp://www.mongodb.org/display/DOCS/Updating#Updating-ModifierOperations  or n that selects documents in collection that match selector. The choice of type depends on use, for example, in find (select sel col) it is a Query, and in delete (select sel col) it is a Selection. :Filter for a query, analogous to the where clause in SQL. []& matches all documents in collection. ["x" =: a, "y" =: b] is analogous to where x = a and y = b in SQL. See  ,http://www.mongodb.org/display/DOCS/Querying for full selector syntax. 4Selects documents in collection that match selector -Collection name (not prefixed with database) If you stack a monad on top of 0 then make it an instance of this class and use [ to execute a DB Action within it. Instances already exist for the basic mtl transformers. 1Parameters for getLastError command. For example ["w" =: 2]o tells the server to wait for the write to reach at least two servers in replica set before acknowledging. See  7http://www.mongodb.org/display/DOCS/Last+Error+Commands for more options. $Type of reads and writes to perform MRead-write action, slave not OK, every write is confirmed with getLastError. 5Read-write action, slave not OK, every write is fire & forget. 9Read-only action, reading stale data from a slave is OK. .Error code from getLastError or query failure eA connection failure, or a read or write exception like cursor expired or inserting a duplicate key. k Note, unexpected data from the server is not a Failure, rather it is a programming error (you should call -a in this case) because the client and server are incompatible and requires a programming change. & found no document matching selection MError observed by getLastError after a write, error description is in string 8Query failed for some reason as described in the string Cursor expired because it wasn't accessed for over 10 minutes, or this cursor came from a different server that the one you are currently connected to (perhaps a fail over happen between servers in a replica set) TCP connection (Pipeline6) failed. May work if you try again on the same Mongo  Connection which will create a new Pipe. bA monad on top of m (which must be a MonadIO) that may access the database and may fail with a DB  Run action against database on server at other end of pipe. Use access mode for any reads and writes. Return Left on connection failure or read/write failure. Same as  [] Same as  Run action with given  &List all databases residing on server Current database in use "Run action against given database Authenticate with the current database (if server is running in secure mode). Return whether authentication was successful or not. Reauthentication is required for every new pipe. &List all collections in this database fAdd Javascript predicate to selector, in which case a document must match both selector and predicate /Insert document into collection and return its "_id"7 value, which is created automatically if not supplied Same as  except don' t return _id 2Insert documents into collection and return their "_id" values, which are created automatically if not supplied. If a document fails to be inserted (eg. due to duplicate key) then remaining docs are aborted, and LastError is set. Same as  except don't return _ids 2Insert documents into collection and return their "_id" values, which are created automatically if not supplied. If a document fails to be inserted (eg. due to duplicate key) then remaining docs are still inserted. LastError is set if any doc fails, not just last one. Same as  except don't return _ids BSave document to collection, meaning insert it if its new (has no "_id") field) or update it if its not new (has "_id" field) 8Replace first document in selection with given document bReplace first document in selection with given document, or insert document if selection is empty 7Update all documents in selection using given modifier "Delete all documents in selection #Delete first document in selection !Fetch documents satisfying query DFetch first document satisfying query or Nothing if none satisfy it Same as  except throw  if none match ,Return performance stats of query execution HFetch number of documents satisfying query (including effect of skip and/or limit if present) 5Fetch distinct values of field in selected documents QReturn next batch of documents in query result, which will be empty if finished. >Return next document in query result, or Nothing if finished. 2Return next N documents or less if end is reached +Return remaining documents in query result OExecute group query and return resulting aggregate value for each distinct key MapReduce on collection with given map and reduce functions. Remaining attributes are set to their defaults, which are stated in their comments. 8Run MapReduce and return cursor of results. Error if map/)reduce fails (because of bad Javascript) kRun MapReduce and return a MR result document containing stats and the results if Inlined. Error if the map/+reduce failed (because of bad Javascript). 7Run command against the database and return its result &runCommand1 foo = runCommand [foo =: 1]Run code on server ./& is treated the same as a programming -. In other words, don' t use it. pqrstuvwxyz{|}~01234567.89:;}34?@ABDpqrstuvwxyz{|}~}43?DBA@|}~{zyvxwrutsqpRpqrutsvxwyz{| }~ 01234567.89:; Safe-InferedSMaintains a connection (created on demand) to each server in the named replica set Default MongoDB port = 27017 Host on  Display host as " host:port" / TODO: Distinguish Service and UnixSocket port  Read string " hostname:port" as Host hosthame (PortNumber port) or "hostname" as  host hostname> (default port). Fail if string does not match either syntax. * TODO: handle Service and UnixSocket port  Read string " hostname:port" as Host hostname (PortNumber port) or "hostname" as  host hostname? (default port). Error if string does not match either syntax.  (and ) fails if it can'?t connect within this many seconds (default is 6 seconds). Use  'connect\'' (and 'openReplicaSet\'') if you want to ignore this global and specify your own timeout. Note, this timeout only applies to initial connection establishment, not when reading/writing to the connection. nConnect to Host returning pipelined TCP connection. Throw IOError if connection refused or no response within . Connect to Host returning pipelined TCP connection. Throw IOError if connection refused or no response within given number of seconds. name of connected replica set Open connections (on demand) to servers in replica set. Supplied hosts is seed list. At least one of them must be a live member of the named replica set, otherwise fail. The value of m at the time of this call is the timeout used for future member connect attempts. To use your own value call 'openReplicaSet\'' instead. Open connections (on demand) to servers in replica set. Supplied hosts is seed list. At least one of them must be a live member of the named replica set, otherwise fail. Supplied seconds timeout is used for connect attempts to members. %Close all connections to replica set SReturn connection to current primary of replica set. Fail if no primary available. QReturn connection to a random secondary, or primary if no secondaries available. Return a connection to a host using a user-supplied sorting function, which sorts based on a tuple containing the host and a boolean indicating whether the host is primary. *j*j Safe-Infered Create collection with given options. You only need to call this to set options, otherwise a collection is created automatically on first use with no options.  -Rename first collection to second collection Delete the given collection! Return True if collection existed (and was deleted); return False if collection did not exist (and no action). This operation takes a while iSpec of index of ordered keys on collection. Name is generated from keys. Unique and dropDups are False. -Create index if we did not already create one. May be called repeatedly with practically no performance hit, because we remember if we already called this for the same index (although this memory gets wiped out every 15 minutes, in case another client drops the index and we want to create it again). ECreate index on the server. This call goes to the server every time. Remove the index #Get all indexes on this collection $Drop all indexes on this collection !Fetch all users of this database cAdd user with password with read-only access if bool is True or read-write access if bool is False "admin" database QCopy database from given host to the server I am connected to. Fails and returns ok = 0 if we don'Mt have permission to read from given server (use copyDatabase in this case). KCopy database from given host to the server I am connected to. If username &8 password is supplied use them to read from given host. Delete the given database! BAttempt to fix any corrupt records. This operation takes a while. (8See currently running operation on the database, if any 1      !"#$%&'()*1      !"#$%&'()*1      !"#$%&'()*%      !"#$%&'()* Safe-Infered<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~*34?@ABDjpqrstuvwxyz{|}~      !"#$%&'()*     !"#$%&'()*+,-./0123456789:;<=>?@AABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqr$%stuvwxyz{|}~QQ      !"#$%&'()*+,-./0-123456789:;<=>?@A?@B?@C?@D?@E?@F?@G?@H?@I?@J?@K?@L?@M?@N?@O?@P?@Q?@R?@S?@T?@U?@V?@W?@X?@Y?@Z?@[?@\?@]?@^?@_?@`?@a?@b?@c?@d?@e?@f?@g?@h?@i?@j?@k?@l?@m?@n?@o?@o?@p?@p?@q?@q?@r?@r?@s?@s?@t?@t?@u?@u?@v?@v?@w?@w?@x?@y?@z?@{?@|} mongoDB-1.3.0Database.MongoDB.ConnectionSystem.IO.PoolSystem.IO.PipelineDatabase.MongoDB.Internal.Util"Database.MongoDB.Internal.ProtocolDatabase.MongoDB.QueryDatabase.MongoDB.AdminDatabase.MongoDBnetwork-2.3.0.14NetworkService PortNumber UnixSocketPortIDPoolfactory resourcesFactory newResource killResource isExpirednewPool aResourcepoolSizeresizekillAllPipelineIOStream writeStream readStream closeStreamIOE newPipelinecloseisClosedsendcallMonadIO' mergesortM mergesortM' merge_pairsMmergeMwrapshuffleloop untilSuccess untilSuccess'whenJustliftIOErunIOE updateAssocsbitOr<.>true1hGetN byteStringHexbyteHexNoncePasswordUsername ResponseFlag AwaitCapable QueryErrorCursorNotFoundReplyrResponseFlags rCursorId rStartingFrom rDocuments QueryOptionPartial AwaitDataNoCursorTimeoutSlaveOKTailableCursorRequestGetMoregFullCollection gBatchSize gCursorIdQueryqOptionsqFullCollectionqSkip qBatchSize qSelector qProjectorCursorId DeleteOption SingleRemove UpdateOption MultiUpdateUpsert InsertOption KeepGoingNotice KillCursors kCursorIdsDeletedFullCollectiondOptions dSelectorUpdateuFullCollectionuOptions uSelectoruUpdaterInsertiFullCollectioniOptions iDocumentsFullCollectionPipenewPipepwHashpwKeyCommandMRResultMRMergeReduceMergeReplaceMROutOutputInline FinalizeFun ReduceFunMapFun MapReducerCollrMaprReducerSelectrSortrLimitrOut rFinalizerScoperVerboseGroupKeyKeyFKeyGroupgCollgKeygReducegInitialgCond gFinalizeCursor BatchSizeOrderLimit Projectoroptions selectionprojectskiplimitsortsnapshot batchSizehintModifierSelectselectSelector Selectionselectorcoll CollectionDatabaseMonadDB BaseMonadliftDB GetLastError AccessMode ConfirmWritesUnconfirmedWrites ReadStaleOk ErrorCodeFailure DocNotFound WriteFailure QueryFailureCursorNotFoundFailureConnectionFailureActionaccessmasterslaveOk accessMode allDatabases thisDatabaseuseDbauthallCollectionswhereJSinsertinsert_ insertMany insertMany_ insertAll insertAll_savereplacerepsertmodifydelete deleteOnefindfindOnefetchexplaincountdistinct nextBatchnextnextNrest closeCursorisCursorClosedgroup mapReducerunMRrunMR' runCommand runCommand1eval ReplicaSetReplicaSetNameSecsHost defaultPorthost showHostPort readHostPortM readHostPortglobalConnectTimeoutconnectconnect' replSetNameopenReplicaSetopenReplicaSet'closeReplicaSetprimary secondaryOk routedHostOpNumMilliSecProfilingLevelAllSlowOffIndexiColliKeyiNameiUnique iDropDups IndexNameCollectionOptionMaxItems MaxByteSizeCappedcreateCollectionrenameCollectiondropCollectionvalidateCollectionindex ensureIndex createIndex dropIndex getIndexes dropIndexesallUsersaddUser removeUseradmin cloneDatabase copyDatabase dropDatabaserepairDatabaseserverBuildInfo serverVersioncollectionStatsdataSize storageSizetotalIndexSize totalSizegetProfilingLevelsetProfilingLeveldbStats currentOpkillOp serverStatustransformers-0.3.0.0Control.Monad.Trans.ErrorstrMsg $fMonadIO'mbaseGHC.Errerror$fErrorFailureGHC.Basefail $fSelectQuery$fSelectSelection $fMonadDBRWST$fMonadDBWriterT$fMonadDBStateT$fMonadDBReaderT$fMonadDBErrorT$fMonadDBAction$fMonadTransControlAction$fMonadTransAction$fMonadBaseControlbAction$fMonadBasebAction bson-0.2.0 Data.Bson genObjectId timestamp typeOfValtypedcastfval=?=:mergeexcludeincludeatvalueAtlookuplook!?Documentvaluelabel:=FieldLabelFloatStringDocArrayBinFunUuidMd5UserDefObjIdBoolUTCNullRegExJavaScrSymInt32Int64StampMinMaxValuecast'valValBinaryFunctionUUIDMD5 UserDefinedRegex JavascriptSymbol MongoStampMinKeyMaxKey MinMaxKeyOidObjectId