License | GPL2 |
---|---|
Maintainer | zcarterc@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Extensions |
|
This module is HashMap ConcreteTypeRep Dynamic with a twist. The Dynamic used can also be ByteString, to make repeated reserialization cheap. A user-provided State-like is used to store this.
- newtype DynamicState = DynamicState {
- unDynamicState :: HashMap ConcreteTypeRep Dynamic
- getDyn :: forall m a. (Typeable a, Binary a, Monad m) => m DynamicState -> (DynamicState -> m ()) -> m (Maybe a)
- putDyn :: forall m a. (Typeable a, Binary a, Monad m) => m DynamicState -> (DynamicState -> m ()) -> a -> m ()
Documentation
newtype DynamicState Source #
An extensible record, indexed by type, using state to cache deserializtion
DynamicState | |
|
getDyn :: forall m a. (Typeable a, Binary a, Monad m) => m DynamicState -> (DynamicState -> m ()) -> m (Maybe a) Source #
Get a value, inside a State-like monad specified by the first two functions
putDyn :: forall m a. (Typeable a, Binary a, Monad m) => m DynamicState -> (DynamicState -> m ()) -> a -> m () Source #
Set a value, inside a State-like monad specified by the first two functions