haxl-0.3.1.0: A Haskell library for efficient, concurrent, and concise data access.

Safe HaskellNone
LanguageHaskell2010

Haxl.Core.Memo

Description

Most users should import Haxl.Core instead of importing this module directly.

Synopsis

Documentation

memo :: (Typeable a, Typeable k, Hashable k, Eq k) => k -> GenHaxl u a -> GenHaxl u a Source

Memoize a computation using an arbitrary key. The result will be calculated once; the second and subsequent time it will be returned immediately. It is the caller's responsibility to ensure that for every two calls memo key haxl, if they have the same key then they compute the same result.

data MemoFingerprintKey a where Source

A memo key derived from a 128-bit MD5 hash. Do not use this directly, it is for use by automatically-generated memoization.