uni-util-2.2.1.2: Utilities for the uniform workbench

Safe HaskellSafe-Infered

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 eltSource