Copyright | (c) Boris Sukholitko 2012 |
---|---|
License | BSD3 |
Maintainer | boriss@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
MonadPlus with left catch (MonadOr) for StateT.
- data StatePlusT s m a
- runStatePlusT :: Monad m => StatePlusT s m a -> s -> m (Maybe a, s)
- execStatePlusT :: Monad m => StatePlusT s m a -> s -> m s
- evalStatePlusT :: Monad m => StatePlusT s m a -> s -> m (Maybe a)
The StatePlusT monad transformer
data StatePlusT s m a Source #
StatePlusT behaves similar to StateT monad transformer
Monad m => MonadState s (StatePlusT s m) Source # | |
MonadTrans (StatePlusT s) Source # | |
Monad m => Monad (StatePlusT s m) Source # | |
Functor m => Functor (StatePlusT s m) Source # | |
(Monad m, Functor m) => Applicative (StatePlusT s m) Source # | |
MonadIO m => MonadIO (StatePlusT s m) Source # | |
(Monad m, Functor m) => Alternative (StatePlusT s m) Source # | |
Monad m => MonadPlus (StatePlusT s m) Source # | |
runStatePlusT :: Monad m => StatePlusT s m a -> s -> m (Maybe a, s) Source #
Evaluate StatePlusT monad. In difference from runStateT it returns
Nothing
if mzero
has been encountered. Just a
otherwise.
execStatePlusT :: Monad m => StatePlusT s m a -> s -> m s Source #
Execute StatePlusT monad returning resulting state
evalStatePlusT :: Monad m => StatePlusT s m a -> s -> m (Maybe a) Source #
Evaluate StatePlusT monad returning resulting value. See above for the semantics.