Stability | experimental |
---|---|

Maintainer | Ertugrul Soeylemez <es@ertes.de> |

This module implements the non-transformer variants of the monad transformers found in Control.ContStuff.Trans.

- type Choice r i a = ChoiceT r i Identity a
- listChoice :: Choice [a] [a] a -> [a]
- maybeChoice :: Choice (Maybe a) (Maybe a) a -> Maybe a
- type Cont r a = ContT r Identity a
- runCont :: (a -> r) -> Cont r a -> r
- evalCont :: Cont r r -> r
- modifyCont :: (r -> r) -> Cont r ()
- type State r s a = StateT r s Identity a
- runState :: s -> (s -> a -> r) -> State r s a -> r
- evalState :: s -> State r s r -> r
- execState :: s -> State s s a -> s
- type OldWriter r w a = ContT (r, w) Identity a
- runOldWriter :: Monoid w => OldWriter r w r -> (r, w)
- evalOldWriter :: Monoid w => OldWriter r w r -> r
- execOldWriter :: Monoid w => OldWriter r w r -> w

# Monads

## Choice

listChoice :: Choice [a] [a] a -> [a]Source

Get list of solutions.

## Cont

modifyCont :: (r -> r) -> Cont r ()Source

Modify the result of a CPS computation along the way.

## State

## Writer

runOldWriter :: Monoid w => OldWriter r w r -> (r, w)Source

Run a traditional writer computation.

evalOldWriter :: Monoid w => OldWriter r w r -> rSource

Run a traditional writer computation and return its result.

execOldWriter :: Monoid w => OldWriter r w r -> wSource

Run a traditional writer computation and return its log.