monadLib-3.7.3: A collection of monad transformers.

Safe Haskell | Safe
Language | Haskell98

MonadLib.Monads

Description

This module contains a collection of monads that are defined in terms of the monad transformers from MonadLib. The definitions in this module are completely mechanical and so this module may become obsolete if support for automated derivations for instances becomes well supported across implementations.

# Documentation

data Reader i a Source

Instances

Monad (Reader i) Source |
Functor (Reader i) Source |
MonadFix (Reader i) Source |
Applicative (Reader i) Source |
RunReaderM (Reader i) i Source |
ReaderM (Reader i) i Source |
BaseM (Reader i) (Reader i) Source |

data Writer i a Source

Instances

Monoid i => Monad (Writer i) Source |
Monoid i => Functor (Writer i) Source |
Monoid i => MonadFix (Writer i) Source |
Monoid i => Applicative (Writer i) Source |
Monoid i => RunWriterM (Writer i) i Source |
Monoid i => WriterM (Writer i) i Source |
Monoid i => BaseM (Writer i) (Writer i) Source |

data State i a Source

Instances

Monad (State i) Source |
Functor (State i) Source |
MonadFix (State i) Source |
Applicative (State i) Source |
StateM (State i) i Source |
BaseM (State i) (State i) Source |

data Exception i a Source

Instances

Monad (Exception i) Source |
Functor (Exception i) Source |
MonadFix (Exception i) Source |
Applicative (Exception i) Source |
RunExceptionM (Exception i) i Source |
ExceptionM (Exception i) i Source |
BaseM (Exception i) (Exception i) Source |

data Cont i a Source

Instances

Monad (Cont i) Source |
Functor (Cont i) Source |
Applicative (Cont i) Source |
ContM (Cont i) Source |
BaseM (Cont i) (Cont i) Source |

runReader :: i -> Reader i a -> a Source

runWriter :: Writer i a -> (a, i) Source

runState :: i -> State i a -> (a, i) Source

runException :: Exception i a -> Either i a Source

runCont :: (a -> i) -> Cont i a -> i Source

module MonadLib