Copyright | (c) 2024 Sayo contributors |
---|---|
License | MPL-2.0 (see the LICENSE file) |
Maintainer | ymdfield@outlook.jp |
Safe Haskell | None |
Language | GHC2021 |
Control.Monad.Hefty.NonDet
Description
Interpreters for the non-determinism effects.
Synopsis
- runNonDet :: forall f (es :: [Effect]) a. (Alternative f, FOEs es) => Eff (Choose ': (Empty ': es)) a -> Eff es (f a)
- runNonDetMonoid :: forall ans (es :: [Effect]) a. (Monoid ans, FOEs es) => (a -> Eff es ans) -> Eff (Choose ': (Empty ': es)) a -> Eff es ans
- runChoose :: forall f (es :: [Effect]) a. (Alternative f, FOEs es) => Eff (Choose ': es) a -> Eff es (f a)
- runChooseMonoid :: forall ans (es :: [Effect]) a. (Semigroup ans, FOEs es) => (a -> Eff es ans) -> Eff (Choose ': es) a -> Eff es ans
- runEmpty :: forall a (es :: [Effect]). FOEs es => Eff (Empty ': es) a -> Eff es (Maybe a)
- module Data.Effect.NonDet
Documentation
runNonDet :: forall f (es :: [Effect]) a. (Alternative f, FOEs es) => Eff (Choose ': (Empty ': es)) a -> Eff es (f a) Source #
NonDet effects handler for alternative answer type.
runNonDetMonoid :: forall ans (es :: [Effect]) a. (Monoid ans, FOEs es) => (a -> Eff es ans) -> Eff (Choose ': (Empty ': es)) a -> Eff es ans Source #
NonDet effects handler for monoidal answer type.
runChoose :: forall f (es :: [Effect]) a. (Alternative f, FOEs es) => Eff (Choose ': es) a -> Eff es (f a) Source #
Choose
effect handler for alternative answer type.
runChooseMonoid :: forall ans (es :: [Effect]) a. (Semigroup ans, FOEs es) => (a -> Eff es ans) -> Eff (Choose ': es) a -> Eff es ans Source #
Choose
effect handler for monoidal answer type.
runEmpty :: forall a (es :: [Effect]). FOEs es => Eff (Empty ': es) a -> Eff es (Maybe a) Source #
Empty
effect handler.
module Data.Effect.NonDet