úÎ LIH4      !"#$%&'()*+,-./0123 non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com> :A type class for implementing a caching policy (e.g. LRU) CA new element is added to the cache or an already existing element  was accessed.  Returns the "last"$ element w.r.t. the caching policy. Removes and returns the "last"$ element w.r.t. the caching policy. "Creates an empty cache structure. Checks for emptyness. *Transforms the cache structure to a list. An element is deleted. 0Checks if an element is in the cache structure. Returns the size. Should be O(1). Runs 3 a number of times. Has a default implementation.         non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>4non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>:This class needs to be instantiated when developing a new B backend. The backend is expected to be able to handle concurrent  (non-conflicting) requests. (Called when a new element was inserted. $Called when an element was updated. 1Called when an element was deleted from the map. 1Called when an element is not found in the map.  Called by  flushBackend and  purgeTMap.  Called in  newTMapIO non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>The binary-backend type UCreates a new backend that stores one file per entry in the given working directory. non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>Creates a new . non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>5/Element exists neither in backend nor in cache 6 Cache miss 7 Cache hit KCreates a new TMap. You will need to use an apropriate backend and specify  the caching policy, e.g.,   D import Data.TMap.Backend.Binary( BinaryBackend,mkBinaryBackend ) ' import Data.TMap.CacheStructure.LRU Ewill use a binary-serialization backend for persistent storage and a "least recently  used" caching algorithm. .Now, to create an unbounded map that uses the ' FM Int String' (see package EdisonCore)  as the map type, you can write   backend <- mkBinaryBackend " myworkdir" " mytempdir"  tmap <O- newTMapIO backend Nothing :: IO (TMap (FM Int) Int String BinaryBackend LRU) !OLooks for a given key in the map and (if necessary) in the persistent storage # and updates the map if necessary. ",Checks whether the given key is in the map. #1Adds a key-value mapping to the map. Can throw a   exception. $FApplies a function to the element identified by the key. Can throw an  exception. %)Removes a key from the map. Can throw an  exception. &JReduces the map to the appropriate size if the maximum size was exceeded.  Calls Data.TMap.Backend.flush if the map is purged.  Runs in O(1)- if the map size is within bounds, otherwise O(n). 'JReduces the map to the appropriate size if the maximum size was exceeded.  Calls Data.TMap.Backend.flush if the map is purged.  Runs in O(1)- if the map size is within bounds, otherwise O(n).  Warning:F This function should always be called at the end of a transaction to % prevent nonterminating retry-loops! ("Sets the maximum size of the map. O(1)'. Note that the size of the TMap needs 7 to be reduced manually to the maximum size by calling  purgeTMap. )"Gets the maximum size of the map. O(1). *"Gets the current size of the map. O(1). +Sends a B.flush9 request to the backend. Useful for asynchronous backend  implementations.  !"#$%&'()*+ !#%"$'&)(*+  !"#$%&'()*+non-portable (requires STM) experimental$Peter Robinson <thaldyron@gmail.com>,7Instantiated by types where values have a unique key. .GAdds a new element to the map. The key is automatically deduced by the  , instantiation. /MTries to fill a partially initialized value with data from the TMap. Returns  8 6 if the TMap does not contain a corresponding entry. 0DFills a partially initialized value with data from the TMap. Throws  an / exception if there is no corresponding entry. 1"Removes the element from the map. 2-Removes the entry that has the supplied key. 3KApplies a function to an element that might be only partially initialized.  &',-./0123 ,- ./0123'&,--./0123 9:;<=>9:;<:;<=>?  !"#$%&&'()*! +,-./0123456789:;<=> ? @ @ A B C DEpersistent-map-0.1.1 Data.TMapData.CacheStructureData.TMap.BackendData.TMap.Backend.BinaryData.TMap.Backend.NoBackendData.TMap.Backend.StdoutBackend Data.TStorageData.TMap.ExceptionData.CacheStructure.LRUbase Data.MaybeSample TMapExceptionBackendExceptionTMapDefaultExc EntryNotFoundDuplicateEntryCacheStructurehitlastpopemptynulltoListdeletemembersizepopManyCacheExceptionBackendinsertadjustlookupflush initialize BinaryBackendmkBinaryBackend NoBackend StdoutBackendnewStdoutBackendTMap newTMapIO purgeTMapIO purgeTMapsetMaximumSizegetMaximumSizegetCurrentSize flushBackendHasKeykeyadd tryCompletecompleteremove removeByKeyapply LRU-0.1.1Data.LRULRU NotInBackend NotInTMapEntryNothingSometypetheidnamesampletest