dep-t-value-0.1.0.0: Pair resources files with types within your program.
Safe HaskellNone
LanguageHaskell2010

Dep.Value.Cached

Description

Cache Values to avoid repeated calls to the underlying value-obtaining action, which migh be expensive.

Typically, this module only needs to be imported when creating the global application environment.

Synopsis

caching Values

type Ref v = MVar (Maybe v) Source #

allocateRef :: MonadIO m => ContT () m (Ref v) Source #

cache :: MonadUnliftIO m => Ref v -> Value v m -> Value v m Source #