monadLib-3.5.2: A collection of monad transformers.



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.


data Reader i a Source


data Writer i a Source


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

data State i a Source


Monad (State i) 
Functor (State i) 
MonadFix (State i) 
StateM (State i) i 
BaseM (State i) (State i) 

data Cont i a Source


Monad (Cont i) 
Functor (Cont i) 
ContM (Cont i) 
BaseM (Cont i) (Cont i) 

runReader :: i -> Reader i a -> aSource

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

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

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

module MonadLib