expiring-cache-map-0.0.6.1: General purpose simple caching.

Copyright | (c) 2014 Edward L. Blake
License | BSD-style
Maintainer | Edward L. Blake <edwardlblake@gmail.com>
Stability | experimental
Portability | portable
Safe Haskell | Safe-Inferred
Language | Haskell98

Caching.ExpiringCacheMap.Internal.Types

Contents

- Cache internals

Description

Types used by internal functions and as the opaque types exported by other modules, assume these type definitions to change from version to version.

Synopsis

- newtype ECM (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = ECM (b (CacheState s m k v), Maybe s -> k -> a (TimeUnits, (Maybe s, v)), a TimeUnits, ECMMapSize, ECMIncr, ECMULength, ECMULength, ECMEnterState a b s m k v, ECMReadState a b s m k v)
- newtype CacheState s (m :: Type -> Type -> Type) k v = CacheState (Maybe s, m k (TimeUnits, TimeUnits, v), ECMMapSize, ([(k, ECMIncr)], ECMULength), ECMIncr)
- type ECMNewState (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = CacheState s m k v -> a (b (CacheState s m k v))
- type ECMEnterState (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = b (CacheState s m k v) -> (CacheState s m k v -> a (CacheState s m k v, v)) -> a v
- type ECMReadState (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = b (CacheState s m k v) -> a (CacheState s m k v)

# Cache internals

newtype ECM (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v Source #

The type that encapsulates a cache map.

Constructors

ECM (b (CacheState s m k v), Maybe s -> k -> a (TimeUnits, (Maybe s, v)), a TimeUnits, ECMMapSize, ECMIncr, ECMULength, ECMULength, ECMEnterState a b s m k v, ECMReadState a b s m k v) |

newtype CacheState s (m :: Type -> Type -> Type) k v Source #

The cache state.

Constructors

CacheState (Maybe s, m k (TimeUnits, TimeUnits, v), ECMMapSize, ([(k, ECMIncr)], ECMULength), ECMIncr) |

type ECMNewState (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = CacheState s m k v -> a (b (CacheState s m k v)) Source #

type ECMEnterState (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = b (CacheState s m k v) -> (CacheState s m k v -> a (CacheState s m k v, v)) -> a v Source #

type ECMReadState (a :: Type -> Type) (b :: Type -> Type) s (m :: Type -> Type -> Type) k v = b (CacheState s m k v) -> a (CacheState s m k v) Source #