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

Safe HaskellNone

Haxl.Core.StateStore

Synopsis

Documentation

class Typeable1 f => StateKey f Source

StateKey maps one type to another type. A type that is an instance of StateKey can store and retrieve information from a StateStore.

Associated Types

data State f Source

data StateStore Source

The StateStore maps a StateKey to the State for that type.

stateGet :: forall r. StateKey r => StateStore -> Maybe (State r)Source

Retrieves a State from the StateStore container.

stateSet :: forall f. StateKey f => State f -> StateStore -> StateStoreSource

Inserts a State in the StateStore container.

stateEmpty :: StateStoreSource

A StateStore with no entries.