-- 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. -- -- Changelog: -- --
-- 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.Strict -- | 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 module Data.Vault.ST.Lazy -- | 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.Lazy -- | 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