-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | a persistent store for values of arbitrary types -- -- A vault is a persistent store for values of arbitrary types. -- It's like having first-class access to the storage space behind -- IORefs. -- -- The data structure is analogous to a bank vault, where you can access -- different bank boxes with different keys; hence the name. -- -- Also provided is a locker type, representing a store for a -- single element. @package vault @version 0.2.0.0 module Data.Unique.Really -- | An abstract unique value. Values of type Unique may be compared -- for equality and hashed into Int. -- -- Note: Unlike the symbols from Data.Unique, the symbols from -- this module do not become equal after reloads in the GHC interpreter! data Unique -- | Creates a new object of type Unique. The value returned will -- not compare equal to any other value of type Unique returned by -- previous calls to newUnique. There is no limit on the number of -- times you may call this function. newUnique :: IO Unique -- | Hashes a Unique into an Int. Two Uniques may hash to the -- same value, although in practice this is unlikely. The Int -- returned makes a good hash key. hashUnique :: Unique -> Int instance Eq Unique instance Hashable Unique module Data.Vault.ST -- | A persistent store for values of arbitrary types. -- -- This variant is the simplest and creates keys in the IO monad. -- See the module Data.Vault.ST if you want to use it with the -- ST monad instead. -- --
--   type Vault :: * -> *
--   instance Monoid Vault
--   
type Vault = Vault -- | Keys for the vault. -- --
--   type Key :: * -> * -> *
--   
type Key = Key -- | The empty vault. empty :: Vault s -- | Create a new key for use with a vault. newKey :: ST s (Key s a) -- | Lookup the value of a key in the vault. lookup :: Key s a -> Vault s -> Maybe a -- | Insert a value for a given key. Overwrites any previous value. insert :: Key s a -> a -> Vault s -> Vault s -- | Adjust the value for a given key if it's present in the vault. adjust :: (a -> a) -> Key s a -> Vault s -> Vault s -- | Delete a key from the vault. delete :: Key s a -> Vault s -> Vault s -- | Merge two vaults (left-biased). union :: Vault s -> Vault s -> Vault s -- | A persistent store for a single value. -- --
--   type Locker :: * -> *
--   
type Locker = Locker -- | Put a single value into a Locker. lock :: Key s a -> a -> Locker s -- | Retrieve the value from the Locker. unlock :: Key s a -> Locker s -> Maybe a instance Monoid (Vault s) module Data.Vault -- | A persistent store for values of arbitrary types. -- -- This variant is the simplest and creates keys in the IO monad. -- See the module Data.Vault.ST if you want to use it with the -- ST monad instead. -- --
--   type Vault :: *
--   instance Monoid Vault
--   
type Vault = Vault RealWorld -- | Keys for the vault. -- --
--   type Key :: * -> *
--   
type Key = Key RealWorld -- | The empty vault. empty :: Vault -- | Create a new key for use with a vault. newKey :: IO (Key a) -- | Lookup the value of a key in the vault. lookup :: Key a -> Vault -> Maybe a -- | Insert a value for a given key. Overwrites any previous value. insert :: Key a -> a -> Vault -> Vault -- | Adjust the value for a given key if it's present in the vault. adjust :: (a -> a) -> Key a -> Vault -> Vault -- | Delete a key from the vault. delete :: Key a -> Vault -> Vault -- | Merge two vaults (left-biased). union :: Vault -> Vault -> Vault -- | A persistent store for a single value. -- --
--   type Locker :: *
--   
type Locker = Locker RealWorld -- | Put a single value into a Locker. lock :: Key a -> a -> Locker -- | Retrieve the value from the Locker. unlock :: Key a -> Locker -> Maybe a