HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulevault-0.3.1.5Haskell2010

Data.Vault.Lazy

A persistent store for values of arbitrary types.

The Vault type in this module is strict in the keys but lazy in the values.

  • 3 types
  • 9 values
  • Packagevault-0.3.1.5
  • Exports12
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceLazy.hs

Vault

9 declarations
typetype Vault = Vault RealWorld
#

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.

valuenewKey :: IO (Key a)
#

Create a new key for use with a vault.

valueinsert :: Key a -> a -> Vault -> Vault
#

Insert a value for a given key. Overwrites any previous value.

valueadjust :: (a -> a) -> Key a -> Vault -> Vault
#

Adjust the value for a given key if it's present in the vault.

Locker

3 declarations