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

Language | Haskell2010 |

## Synopsis

- data EndState s m a where
- GetEndState :: EndState s m s

- getEndState :: forall s r. MemberWithError (EndState s) r => Sem r s
- runEndState :: (Member (State s) r, Member Fixpoint r) => Sem (EndState s ': r) a -> Sem r a
- runEndAtomicState :: (Member (AtomicState s) r, Member Fixpoint r) => Sem (EndState s ': r) a -> Sem r a

# Effect

data EndState s m a where Source #

An effect for getting the end state of a computation in advance.

GetEndState :: EndState s m s |

## Instances

type DefiningModule (EndState :: k1 -> k2 -> k1 -> Type) Source # | |

Defined in Polysemy.EndState |

# Actions

getEndState :: forall s r. MemberWithError (EndState s) r => Sem r s Source #

# Interpretations

runEndState :: (Member (State s) r, Member Fixpoint r) => Sem (EndState s ': r) a -> Sem r a Source #

Runs an `EndState`

effect by getting the state after the computation
has finished, and providing it recursively back to calls of `getEndState`

.

runEndAtomicState :: (Member (AtomicState s) r, Member Fixpoint r) => Sem (EndState s ': r) a -> Sem r a Source #

Like `runEndState`

, but for `AtomicState`

rather than `State`

.