| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Automaton.Trans.State
Description
Handle a global StateT layer in an Automaton.
A global state can be hidden by an automaton by making it an internal state.
This module is based on the strict state monad Strict,
so when combining it with other modules such as mtl's,
the strict version has to be included, i.e. Strict
instead of State or Lazy.
Synopsis
- module Control.Monad.Trans.State.Strict
- stateS :: forall (m :: Type -> Type) s a b. (Functor m, Monad m) => Automaton m (s, a) (s, b) -> Automaton (StateT s m) a b
- runStateS :: forall (m :: Type -> Type) s a b. (Functor m, Monad m) => Automaton (StateT s m) a b -> Automaton m (s, a) (s, b)
- runStateS_ :: forall (m :: Type -> Type) s a b. (Functor m, Monad m) => Automaton (StateT s m) a b -> s -> Automaton m a (s, b)
- runStateS__ :: forall (m :: Type -> Type) s a b. (Functor m, Monad m) => Automaton (StateT s m) a b -> s -> Automaton m a b
Documentation
stateS :: forall (m :: Type -> Type) s a b. (Functor m, Monad m) => Automaton m (s, a) (s, b) -> Automaton (StateT s m) a b Source #
runStateS :: forall (m :: Type -> Type) s a b. (Functor m, Monad m) => Automaton (StateT s m) a b -> Automaton m (s, a) (s, b) Source #