Copyright | (c) Eduard Sergeev 2013 |
---|---|
License | BSD-style (see the file LICENSE) |
Maintainer | eduard.sergeev@gmail.com |
Stability | experimental |
Portability | non-portable (multi-param classes, flexible instances) |
Safe Haskell | None |
Language | Haskell2010 |
Generic StateCache - wrapper around StateT
Synopsis
- data StateCache c m a
- runStateCache :: StateCache s m a -> s -> m (a, s)
- container :: Monad m => StateCache c m c
- setContainer :: Monad m => c -> StateCache c m ()
- evalStateCache :: Monad m => StateCache c m a -> c -> m a
Documentation
data StateCache c m a Source #
Instances
runStateCache :: StateCache s m a -> s -> m (a, s) Source #
container :: Monad m => StateCache c m c Source #
Returns internal container
setContainer :: Monad m => c -> StateCache c m () Source #
Assigns new value to internal container
evalStateCache :: Monad m => StateCache c m a -> c -> m a Source #
Evaluates computation discarding the resulting container