foundation-0.0.3: Alternative prelude with batteries and no dependencies

Safe Haskell | None
Language | Haskell2010

Foundation.Monad.State

Synopsis

- data StateT s m a

# Documentation

data StateT s m a #

State Transformer

Instances

MonadTrans (StateT s) # |
Methods lift :: Monad m => m a -> StateT s m a #
(Functor m, Monad m) => Monad (StateT s m) # |
Methods (>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b # (>>) :: StateT s m a -> StateT s m b -> StateT s m b # return :: a -> StateT s m a # fail :: String -> StateT s m a #
Functor m => Functor (StateT s m) # |
Methods fmap :: (a -> b) -> StateT s m a -> StateT s m b # (<$) :: a -> StateT s m b -> StateT s m a #
(Applicative m, Monad m) => Applicative (StateT s m) # |
Methods pure :: a -> StateT s m a # (<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b # (*>) :: StateT s m a -> StateT s m b -> StateT s m b # (<*) :: StateT s m a -> StateT s m b -> StateT s m a #
(Functor m, MonadIO m) => MonadIO (StateT s m) # |
Methods liftIO :: IO a -> StateT s m a #
(Functor m, MonadCatch m) => MonadCatch (StateT s m) # |
Methods catch :: Exception e => StateT s m a -> (e -> StateT s m a) -> StateT s m a #
(Functor m, MonadThrow m) => MonadThrow (StateT s m) # |
Methods throw :: Exception e => e -> StateT s m a #
(Functor m, MonadFailure m) => MonadFailure (StateT s m) # |
Associated Types type Failure (StateT s m :: * -> *) :: * # Methods mFail :: Failure (StateT s m) -> StateT s m () #
type Failure (StateT s m) # |
type Failure (StateT s m) = Failure m