{-----------------------------------------------------------------------------
vault
------------------------------------------------------------------------------}moduleData.Vault(-- * Synopsis-- | A persistent store for values of arbitrary types.-- * VaultVault,Key,empty,newKey,lookup,insert,adjust,delete,union,-- * LockerLocker,lock,unlock,)whereimportPreludehiding(lookup)importControl.Monad.STimportqualifiedData.Vault.STasST{-----------------------------------------------------------------------------
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 VaulttypeVault=ST.VaultRealWorld-- | Keys for the vault.---- > type Key :: * -> *typeKey=ST.KeyRealWorld-- | The empty vault.empty::Vaultempty=ST.empty-- | Create a new key for use with a vault.newKey::IO(Keya)newKey=stToIOST.newKey-- | Lookup the value of a key in the vault.lookup::Keya->Vault->Maybealookup=ST.lookup-- | Insert a value for a given key. Overwrites any previous value.insert::Keya->a->Vault->Vaultinsert=ST.insert-- | Adjust the value for a given key if it's present in the vault.adjust::(a->a)->Keya->Vault->Vaultadjust=ST.adjust-- | Delete a key from the vault.delete::Keya->Vault->Vaultdelete=ST.delete-- | Merge two vaults (left-biased).union::Vault->Vault->Vaultunion=ST.union{-----------------------------------------------------------------------------
Locker
------------------------------------------------------------------------------}-- | A persistent store for a single value.---- > type Locker :: *typeLocker=ST.LockerRealWorld-- | Put a single value into a 'Locker'.lock::Keya->a->Lockerlock=ST.lock-- | Retrieve the value from the 'Locker'.unlock::Keya->Locker->Maybeaunlock=ST.unlock