definitive-base-2.6.3: A small Prelude wrapper to simplify my own Haskell developments

Safe HaskellNone
LanguageHaskell2010

Algebra.Monad.RWS

Contents

Synopsis

Documentation

newtype RWST r w s m a Source #

Constructors

RWST 

Fields

Instances

(Monad m, Monoid w, MonadFuture n m) => MonadFuture n (RWST r w s m) Source # 

Methods

future :: n a -> RWST r w s m a Source #

(Monoid w, MonadError e m) => MonadError e (RWST r w s m) Source # 

Methods

throw :: e -> RWST r w s m a Source #

catch :: (e -> RWST r w s m a) -> RWST r w s m a -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadWriter w (RWST r w s m) Source # 

Methods

tell :: w -> RWST r w s m () Source #

listen :: RWST r w s m a -> RWST r w s m (w, a) Source #

censor :: RWST r w s m (a, w -> w) -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadReader r (RWST r w s m) Source # 

Methods

ask :: RWST r w s m r Source #

local :: (r -> r) -> RWST r w s m a -> RWST r w s m a Source #

(Monad m, Monoid w) => MonadState s (RWST r w s m) Source # 

Methods

get :: RWST r w s m s Source #

put :: s -> RWST r w s m () Source #

modify :: (s -> s) -> RWST r w s m () Source #

Monoid w => ConcreteMonad (RWST r w s) Source # 

Methods

generalize :: Monad m => RWST r w s Id a -> RWST r w s m a Source #

Monoid w => MonadTrans (RWST r w s) Source # 

Methods

lift :: Monad m => m a -> RWST r w s m a Source #

Monoid w => MonadInternal (RWST r w s) Source # 

Methods

internal :: Monad m => (forall c. m (c, a) -> m (c, b)) -> RWST r w s m a -> RWST r w s m b Source #

(Unit f, Monoid w) => Unit (RWST r w s f) Source # 

Methods

pure :: a -> RWST r w s f a Source #

(Monoid w, MonadCont m) => MonadCont (RWST r w s m) Source # 

Methods

callCC :: (forall b. (a -> RWST r w s m b) -> RWST r w s m b) -> RWST r w s m a Source #

(Monoid w, MonadList m) => MonadList (RWST r w s m) Source # 

Methods

choose :: [a] -> RWST r w s m a Source #

(Monoid w, MonadFix m) => MonadFix (RWST r w s m) Source # 

Methods

mfix :: (a -> RWST r w s m a) -> RWST r w s m a Source #

Traversable m => Traversable (RWST Void w Void m) Source # 

Methods

sequence :: Applicative f => RWST Void w Void m (f a) -> f (RWST Void w Void m a) Source #

Foldable m => Foldable (RWST Void w Void m) Source # 

Methods

fold :: Monoid m => RWST Void w Void m m -> m Source #

(Monoid w, Monad m) => Monad (RWST r w s m) Source # 

Methods

join :: RWST r w s m (RWST r w s m a) -> RWST r w s m a Source #

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b Source #

(Monoid w, Monad m) => Applicative (RWST r w s m) Source # 
(Monoid w, Monad m) => SemiApplicative (RWST r w s m) Source # 

Methods

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b Source #

Functor f => Functor (RWST r w s f) Source # 

Methods

map :: (a -> b) -> RWST r w s f a -> RWST r w s f b Source #

(Monoid w, MonadLogic l m) => MonadLogic (RWST r w s l) (RWST r w s m) Source # 

Methods

deduce :: RWST r w s m a -> RWST r w s l (Maybe (a, RWST r w s m a)) Source #

induce :: RWST r w s l (Maybe (a, RWST r w s m a)) -> RWST r w s m a Source #

Ring (m (a, s, w)) => Ring (RWST r w s m a) Source # 

Methods

one :: RWST r w s m a Source #

Semiring (m (a, s, w)) => Semiring (RWST r w s m a) Source # 

Methods

(*) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

Monoid (m (a, s, w)) => Monoid (RWST r w s m a) Source # 

Methods

zero :: RWST r w s m a Source #

Semigroup (m (a, s, w)) => Semigroup (RWST r w s m a) Source # 

Methods

(+) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a Source #

type RWS r w s a = RWST r w s Id a Source #

class MonadTrans t => MonadInternal t where Source #

Minimal complete definition

internal

Methods

internal :: Monad m => (forall c. m (c, a) -> m (c, b)) -> t m a -> t m b Source #

Instances

MonadInternal (ReaderT r) Source # 

Methods

internal :: Monad m => (forall c. m (c, a) -> m (c, b)) -> ReaderT r m a -> ReaderT r m b Source #

MonadInternal (StateT s) Source # 

Methods

internal :: Monad m => (forall c. m (c, a) -> m (c, b)) -> StateT s m a -> StateT s m b Source #

Monoid w => MonadInternal (WriterT w) Source # 

Methods

internal :: Monad m => (forall c. m (c, a) -> m (c, b)) -> WriterT w m a -> WriterT w m b Source #

Monoid w => MonadInternal (RWST r w s) Source # 

Methods

internal :: Monad m => (forall c. m (c, a) -> m (c, b)) -> RWST r w s m a -> RWST r w s m b Source #

i'RWST :: Iso (RWST r w s m a) (RWST r' w' s' m' a') ((r, s) -> m (a, s, w)) ((r', s') -> m' (a', s', w')) Source #

Default methods

get_ :: (MonadTrans t, MonadState a m) => t m a Source #

put_ :: (MonadTrans t, MonadState s m) => s -> t m () Source #

modify_ :: (MonadTrans t, MonadState s m) => (s -> s) -> t m () Source #

local_ :: (MonadInternal t, MonadReader r m) => (r -> r) -> t m a -> t m a Source #

ask_ :: (MonadTrans t, MonadReader a m) => t m a Source #

tell_ :: (MonadWriter w m, MonadTrans t) => w -> t m () Source #

listen_ :: (MonadInternal t, MonadWriter w m) => t m a -> t m (w, a) Source #

censor_ :: (MonadInternal t, MonadWriter w m) => t m (a, w -> w) -> t m a Source #

getCounter_ :: (MonadTrans t, MonadCounter w acc m) => t m acc Source #

setCounter_ :: (MonadTrans t, MonadCounter w acc m) => acc -> t m () Source #