-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Disk-based hash table -- -- Disk-based hash table @package diskhash @version 0.0.1.2 module Data.DiskHash data DiskHashRO a data DiskHashRW a -- | open a hash table in read-only mode htOpenRO :: forall a. (Storable a) => FilePath -> Int -> IO (DiskHashRO a) -- | open a hash table in read-write mode htOpenRW :: forall a. (Storable a) => FilePath -> Int -> IO (DiskHashRW a) -- | Open a hash table in read-write mode and pass it to an action -- -- Once the action is is complete, the hashtable is closed (and sync'ed -- to disk). withDiskHashRW :: (Storable a) => FilePath -> Int -> (DiskHashRW a -> IO b) -> IO b -- | Lookup by key htLookupRO :: (Storable a) => ByteString -> DiskHashRO a -> Maybe a -- | Lookup by key htLookupRW :: (Storable a) => ByteString -> DiskHashRW a -> IO (Maybe a) -- | Retrieve the size of the hash table htSizeRW :: DiskHashRW a -> IO Int -- | Retrieve the size of the hash table htSizeRO :: DiskHashRO a -> Int -- | insert an element into the hash table -- -- Returns whether an insertion took place (if an object with that key -- already exists, no insertion is made). htInsert :: (Storable a) => ByteString -> a -> DiskHashRW a -> IO Bool -- | Modify a value htModify :: (Storable a) => ByteString -> (a -> a) -> DiskHashRW a -> IO Bool -- | Reserve space in the hash table -- -- If the operation fails, an exception is raised htReserve :: (Storable a) => Int -> DiskHashRW a -> IO Int