Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data Vault s
- data Key s a
- empty :: Vault s
- newKey :: ST s (Key s a)
- lookup :: Key s a -> Vault s -> Maybe a
- insert :: Key s a -> a -> Vault s -> Vault s
- adjust :: (a -> a) -> Key s a -> Vault s -> Vault s
- delete :: Key s a -> Vault s -> Vault s
- union :: Vault s -> Vault s -> Vault s
- data Locker s
- lock :: Key s a -> a -> Locker s
- unlock :: Key s a -> Locker s -> Maybe a
Vault
insert :: Key s a -> a -> Vault s -> Vault s Source #
Insert a value for a given key. Overwrites any previous value.
adjust :: (a -> a) -> Key s a -> Vault s -> Vault s Source #
Adjust the value for a given key if it's present in the vault.