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

Language | Haskell2010 |

Nondeterministic choice effect

# Documentation

Non-determinism (choice)

choose lst non-deterministically chooses one value from the lst choose [] thus corresponds to failure Unlike Reader, Choose is not a GADT because the type of values returned in response to a (Choose a) request is just a, without any constraints.

Choose [a] |

choose :: Member Choose r => [a] -> Eff r a Source #

choose lst non-deterministically chooses one value from the lst choose [] thus corresponds to failure

makeChoice :: forall a r. Eff (Choose ': r) a -> Eff r [a] Source #

Run a nondeterministic effect, returning all values.

mplus' :: Member Choose r => Eff r a -> Eff r a -> Eff r a Source #

MonadPlus-like operators are expressible via choose