Safe Haskell | None |
---|---|

Language | Haskell2010 |

- data ReaderWriterT r w m a
- type ReaderWriter r w a = ReaderWriterT r w Identity a
- runReaderWriterT :: (Monad m, Monoid w) => ReaderWriterT r w m a -> r -> m (a, w)
- runReaderWriter :: Monoid w => ReaderWriter r w a -> r -> (a, w)
- execReaderWriterT :: (Functor m, Monad m, Monoid w) => ReaderWriterT r w m a -> r -> m w

# Documentation

data ReaderWriterT r w m a Source

Fusion between ReaderT and WriterT (But not StateT unlike RWST) which is switchable using MonadSwitch

Uses implementation based on RSST which implements WriterT using state in order to avoid space leaks incurred by the original WriterT

MonadState s m => MonadState s (ReaderWriterT r w m) Source | |

Monad m => MonadReader r (ReaderWriterT r w m) Source | |

(Monad m, Monoid w) => MonadWriter w (ReaderWriterT r w m) Source | |

MonadSample t m => MonadSample t (ReaderWriterT r w m) Source | |

MonadHold t m => MonadHold t (ReaderWriterT r w m) Source | |

(MonadSwitch t m, SwitchMerge t w) => MonadSwitch t (ReaderWriterT r w m) Source | |

MonadTrans (ReaderWriterT r w) Source | |

Monad m => Monad (ReaderWriterT r w m) Source | |

Functor m => Functor (ReaderWriterT r w m) Source | |

MonadFix m => MonadFix (ReaderWriterT r w m) Source | |

Monad m => Applicative (ReaderWriterT r w m) Source |

type ReaderWriter r w a = ReaderWriterT r w Identity a Source

runReaderWriterT :: (Monad m, Monoid w) => ReaderWriterT r w m a -> r -> m (a, w) Source

runReaderWriter :: Monoid w => ReaderWriter r w a -> r -> (a, w) Source

execReaderWriterT :: (Functor m, Monad m, Monoid w) => ReaderWriterT r w m a -> r -> m w Source