Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data LGBT localState globalState m a
- data LGLT localState globalState m a
- data LGCT localState globalState result m a
- class Monad m => MonadLGBT m localState globalState | m -> localState, m -> globalState where
- getLocal :: m localState
- getGlobal :: m globalState
- putLocal :: localState -> m ()
- putGlobal :: globalState -> m ()
- modifyLocal :: (localState -> localState) -> m ()
- modifyGlobal :: (globalState -> globalState) -> m ()
- runLGBT :: forall m localState globalState result. Monad m => LGBT localState globalState m result -> localState -> globalState -> m (Either String (result, localState), globalState)
- runLGLT :: forall m result success localState globalState. Monad m => LGLT localState globalState m success -> localState -> globalState -> (success -> localState -> globalState -> m result -> m result) -> (globalState -> m result) -> m result
- runLGCT :: forall m localState globalState result. Monad m => LGCT localState globalState result m result -> localState -> globalState -> m ((result, localState), globalState)
- withGlobal :: forall t m localState globalState. (Monad m, MonadTrans t, MonadLGBT (t m) localState globalState) => (globalState -> m globalState) -> t m ()
- withLocal :: forall t m localState globalState. (Monad m, MonadTrans t, MonadLGBT (t m) localState globalState) => (localState -> m localState) -> t m ()
- getsLocal :: forall m localState globalState a. MonadLGBT m localState globalState => (localState -> a) -> m a
- getsGlobal :: forall m localState globalState a. MonadLGBT m localState globalState => (globalState -> a) -> m a
Documentation
data LGBT localState globalState m a Source
LGBT monad is sandwiching state with eager BacktrackT
transformer.
MonadTrans (LGBT localState globalState) Source | |
Monad m => Monad (LGBT localState globalState m) Source | |
Functor (LGBT localState globalState m) Source | |
Applicative (LGBT localState globalState m) Source | |
Applicative m => Alternative (LGBT localState globalState m) Source | |
MonadPlus m => MonadPlus (LGBT localState globalState m) Source | |
MonadIO m => MonadIO (LGBT localState globalState m) Source | |
Monad m => MonadLGBT (LGBT localState globalState m) localState globalState Source |
data LGLT localState globalState m a Source
LGBT monad is sandwiching state with fair LogicT
transformer.
MonadTrans (LGLT localState globalState) Source | |
Monad (LGLT localState globalState m) Source | |
Functor (LGLT localState globalState m) Source | |
Applicative (LGLT localState globalState m) Source | |
Alternative (LGLT localState globalState m) Source | |
MonadPlus (LGLT localState globalState m) Source | |
MonadIO m => MonadIO (LGLT localState globalState m) Source | |
Monad m => MonadLogic (LGLT localState globalState m) Source | |
Monad m => MonadLGBT (LGLT localState globalState m) localState globalState Source |
data LGCT localState globalState result m a Source
Local/global state transformer with unlimited continuations MonadCont
MonadTrans (LGCT localState globalState result) Source | |
Monad (LGCT localState globalState result m) Source | |
Functor (LGCT localState globalState result m) Source | |
Applicative (LGCT localState globalState result m) Source | |
MonadIO m => MonadIO (LGCT localState globalState result m) Source | |
MonadCont (LGCT localState globalState result m) Source |
class Monad m => MonadLGBT m localState globalState | m -> localState, m -> globalState where Source
Local/global state transformer class abstracts over details of how global and local state are realized. The separation of local and global state only makes sense when we also allow for some backtracking monad in between, hence the name "Local/global backtracking transformer".
runLGBT :: forall m localState globalState result. Monad m => LGBT localState globalState m result -> localState -> globalState -> m (Either String (result, localState), globalState) Source
runLGLT :: forall m result success localState globalState. Monad m => LGLT localState globalState m success -> localState -> globalState -> (success -> localState -> globalState -> m result -> m result) -> (globalState -> m result) -> m result Source
runLGCT :: forall m localState globalState result. Monad m => LGCT localState globalState result m result -> localState -> globalState -> m ((result, localState), globalState) Source
withGlobal :: forall t m localState globalState. (Monad m, MonadTrans t, MonadLGBT (t m) localState globalState) => (globalState -> m globalState) -> t m () Source
withLocal :: forall t m localState globalState. (Monad m, MonadTrans t, MonadLGBT (t m) localState globalState) => (localState -> m localState) -> t m () Source
getsLocal :: forall m localState globalState a. MonadLGBT m localState globalState => (localState -> a) -> m a Source
getsGlobal :: forall m localState globalState a. MonadLGBT m localState globalState => (globalState -> a) -> m a Source