eventful-memory-0.2.0: In-memory implementations for eventful

Safe HaskellNone




type ProjectionMap key position serialized = Map key (position, serialized) Source #

A ProjectionMap just stores the latest snapshot for each UUID.

emptyProjectionMap :: ProjectionMap key position serialized Source #

projectionMapTVar :: IO (TVar (ProjectionMap key position serialized)) Source #

tvarProjectionCache :: Ord key => TVar (ProjectionMap key position serialized) -> ProjectionCache key position serialized STM Source #

A ProjectionCache that uses a TVar and runs in STM.

embeddedStateProjectionCache :: (MonadState s m, Ord key) => (s -> ProjectionMap key position serialized) -> (s -> ProjectionMap key position serialized -> s) -> ProjectionCache key position serialized m Source #

A ProjectionCache for some MonadState that contains a ProjectionMap.