mtlx-0.1.1: Monad transformer library with type indexes, providing 'free' copies.

Control.Monad.RWSX.Lazy

Documentation

data Index ix => RWSX ix r w s a Source

Constructors

RWSX ix (r -> s -> (a, s, w)) 

Instances

(Monoid w, Index ix) => MonadRWSX ix r w s (RWSX ix r w s) 
(Monoid w, Index ix) => MonadReaderX ix r (RWSX ix r w s) 
(Monoid w, Index ix) => MonadStateX ix s (RWSX ix r w s) 
(Monoid w, Index ix) => MonadWriterX ix w (RWSX ix r w s) 
(Monoid w, Index ix) => Monad (RWSX ix r w s) 
Index ix => Functor (RWSX ix r w s) 
(Monoid w, Index ix) => MonadFix (RWSX ix r w s) 

runRWSX :: Index ix => ix -> RWSX ix r w s a -> r -> s -> (a, s, w)Source

evalRWSX :: Index ix => ix -> RWSX ix r w s a -> r -> s -> (a, w)Source

execRWSX :: Index ix => ix -> RWSX ix r w s a -> r -> s -> (s, w)Source

mapRWSX :: Index ix => ix -> ((a, s, w) -> (b, s, w')) -> RWSX ix r w s a -> RWSX ix r w' s bSource

withRWSX :: Index ix => ix -> (r' -> s -> (r, s)) -> RWSX ix r w s a -> RWSX ix r' w s aSource

data Index ix => RWSTX ix r w s m a Source

Constructors

RWSTX ix (r -> s -> m (a, s, w)) 

Instances

(Monoid w, Monad m, MonadRWSX ix r w s m, MonadStateX ix s m, MonadReaderX ix r m, MonadWriterX ix w m, Index ix) => MonadRWSX ix r w s (RWSTX ix r w s m) 
(MonadReaderX ixr r m, Monad m, Monoid w3, Index ixr, Index ix3) => MonadReaderX ixr r (RWSTX ix3 r3 w3 s3 m) 
(Monoid w, Monad m, Index ix) => MonadReaderX ix r (RWSTX ix r w s m) 
(MonadStateX ixs s m, Monad m, Monoid w3, Index ixs, Index ix3) => MonadStateX ixs s (RWSTX ix3 r3 w3 s3 m) 
(Monoid w, Monad m, Index ix) => MonadStateX ix s (RWSTX ix r w s m) 
(MonadWriterX ixw w m, Monad m, Monoid w3, Monoid w, Index ixw, Index ix3) => MonadWriterX ixw w (RWSTX ix3 r3 w3 s3 m) 
(Monoid w, Monad m, Index ix) => MonadWriterX ix w (RWSTX ix r w s m) 
(Monoid w, MonadError e m, Index ix) => MonadError e (RWSTX ix r w s m) 
(Monoid w, Index ix) => MonadTrans (RWSTX ix r w s) 
(Monoid w, Monad m, Index ix) => Monad (RWSTX ix r w s m) 
(Monad m, Index ix) => Functor (RWSTX ix r w s m) 
(Monoid w, MonadFix m, Index ix) => MonadFix (RWSTX ix r w s m) 
(Monoid w, MonadPlus m, Index ix) => MonadPlus (RWSTX ix r w s m) 
(Monoid w, MonadCont m, Index ix) => MonadCont (RWSTX ix r w s m) 
(Monoid w, MonadIO m, Index ix) => MonadIO (RWSTX ix r w s m) 

runRWSTX :: Index ix => ix -> RWSTX ix r w s m a -> r -> s -> m (a, s, w)Source

evalRWSTX :: (Monad m, Index ix) => ix -> RWSTX ix r w s m a -> r -> s -> m (a, w)Source

execRWSTX :: (Monad m, Index ix) => ix -> RWSTX ix r w s m a -> r -> s -> m (s, w)Source

mapRWSTX :: Index ix => ix -> (m (a, s, w) -> n (b, s, w')) -> RWSTX ix r w s m a -> RWSTX ix r w' s n bSource

withRWSTX :: Index ix => ix -> (r' -> s -> (r, s)) -> RWSTX ix r w s m a -> RWSTX ix r' w s m aSource