monadLib-3.7.3: A collection of monad transformers.

Safe HaskellSafe
LanguageHaskell98

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

data Writer i a Source

Instances

Monoid i => Monad (Writer i) 
Monoid i => Functor (Writer i) 
Monoid i => MonadFix (Writer i) 
Monoid i => Applicative (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

Instances

data Cont i a Source

Instances

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

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

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

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

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

module MonadLib