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

Control.Monad.WriterX.Lazy

Documentation

data Index ix => WriterX ix w a Source

Constructors

WriterX ix (a, w) 

Instances

(Monoid w, Index ix) => MonadWriterX ix w (WriterX ix w) 
(Monoid w, Index ix) => Monad (WriterX ix w) 
Index ix => Functor (WriterX ix w) 
(Monoid w, Index ix) => MonadFix (WriterX ix w) 

runWriterX :: Index ix => ix -> WriterX ix w a -> (a, w)Source

execWriterX :: Index ix => ix -> WriterX ix w a -> wSource

mapWriterX :: Index ix => ix -> ((a, w) -> (b, w')) -> WriterX ix w a -> WriterX ix w' bSource

data Index ix => WriterTX ix w m a Source

Constructors

WriterTX ix (m (a, w)) 

Instances

(Monoid w, Index ixr, Index ixw, MonadReaderX ixr r m) => MonadReaderX ixr r (WriterTX ixw w m) 
(Monoid w, Index ixw, MonadStateX ixs s m) => MonadStateX ixs s (WriterTX ixw w m) 
(Index ixw1, Index ixw2, Monoid w1, Monoid w2, MonadWriterX ixw1 w1 m) => MonadWriterX ixw1 w1 (WriterTX ixw2 w2 m) 
(Monoid w, Monad m, Index ix) => MonadWriterX ix w (WriterTX ix w m) 
(Monoid w, MonadReader r m, Index ixw) => MonadReader r (WriterTX ixw w m) 
(Monoid w, MonadState s m, Index ixw) => MonadState s (WriterTX ixw w m) 
(Monoid w, MonadError e m, Index ix) => MonadError e (WriterTX ix w m) 
(Index ixw2, Monoid w, Monoid s, MonadWriter w m) => MonadWriter w (WriterTX ixw2 s m) 
(Monoid w, Index ix) => MonadTrans (WriterTX ix w) 
(Monoid w, Monad m, Index ix) => Monad (WriterTX ix w m) 
(Monad m, Index ix) => Functor (WriterTX ix w m) 
(Monoid w, MonadFix m, Index ix) => MonadFix (WriterTX ix w m) 
(Monoid w, MonadPlus m, Index ix) => MonadPlus (WriterTX ix w m) 
(Monoid w, MonadCont m, Index ix) => MonadCont (WriterTX ix w m) 
(Monoid w, MonadIO m, Index ix) => MonadIO (WriterTX ix w m) 

runWriterTX :: Index ix => ix -> WriterTX ix w m a -> m (a, w)Source

execWriterTX :: (Index ix, Monad m) => ix -> WriterTX ix w m a -> m wSource

mapWriterTX :: Index ix => ix -> (m (a, w) -> n (b, w')) -> WriterTX ix w m a -> WriterTX ix w' n bSource