An implementation of non-deterministic choice aka backtracking. The two
requests we need to support are: false, (|). We map this to the
MonadPlus (or Alternative) interface: MZero stands for false, and
MPlus stands for (|).
This creates a branching structure with a fanout of 2, resulting in mplus
node being visited approximately 2x (in general, for a fanout of f we'll
have the type of internal node being invoked f/(f-1) times).
Instances4Handle, MonadBaseControl, StM
Alternative f => Handle NDet r a (Eff r' (f w))Defined in extensible-effects-5.0.0.1 · Control.Eff.Logic.NDetGiven a callback and NDet requests respond to them. Note that this makes explicit that we rely on
fto have enough room to store all possibilities.Alternative f => Handle NDet r a ([Eff r a] -> Eff r' (f w))Defined in extensible-effects-5.0.0.1 · Control.Eff.Logic.NDetMore performant handler; uses reified job queue
(MonadBase m m, LiftedBase m r) => MonadBaseControl m (Eff (NDet ': r))Defined in extensible-effects-5.0.0.1 · Control.Eff.Logic.NDettype StM (Eff (NDet ': r)) a = StM (Eff r) [a]Defined in extensible-effects-5.0.0.1 · Control.Eff.Logic.NDet