uni-util-2.3.0.3: Utilities for the uniform workbench
Safe HaskellSafe-Inferred
LanguageHaskell2010

Util.Cache

Description

The Cache module allows us to cache results of expensive stateful computations in memory. Possible improvements - (1) use hashing instead

Documentation

data Ord key => Cache key elt Source #

newCache :: Ord key => (key -> IO elt) -> IO (Cache key elt) Source #

getCached :: Ord key => Cache key elt -> key -> IO elt Source #