Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data NdetEff a
- makeChoiceA :: Alternative f => Eff (NdetEff ': r) a -> Eff r (f a)
- msplit :: Member NdetEff r => Eff r a -> Eff r (Maybe (a, Eff r a))
- unmsplit :: Member NdetEff r => Maybe (a, Eff r a) -> Eff r a
- ifte :: Member NdetEff r => Eff r a -> (a -> Eff r b) -> Eff r b -> Eff r b
- once :: Member NdetEff r => Eff r a -> Eff r a
Documentation
makeChoiceA :: Alternative f => Eff (NdetEff ': r) a -> Eff r (f a) Source #
An interpreter The following is very simple, but leaks a lot of memory The cause probably is mapping every failure to empty It takes then a lot of timne and space to store those empty
unmsplit :: Member NdetEff r => Maybe (a, Eff r a) -> Eff r a Source #
called reflect in the LogicT paper
ifte :: Member NdetEff r => Eff r a -> (a -> Eff r b) -> Eff r b -> Eff r b Source #
Other committed choice primitives can be implemented in terms of msplit The following implementations are directly from the LogicT paper