graft-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Logic.NextBind

Documentation

data NextBind t x where Source #

Constructors

DoNothing :: x -> NextBind t x 
Fail :: NextBind t () 
Now :: t x -> NextBind t x 
Branch :: NextBind t x -> NextBind t x -> NextBind t x 
Next :: NextBind t y -> (y -> NextBind t x) -> NextBind t x 

Instances

Instances details
(MonadPlus m, InterpretEffect m op, InterpretNextBind t m op) => InterpretEffectStateful (NextBind t) m op Source # 
Instance details

Defined in Logic.NextBind

Methods

interpretEffectStateful :: forall (ops :: [Effect]) x a. (forall b y. NextBind t y -> AST ops b -> m (b, NextBind t y)) -> NextBind t x -> op (AST ops) a -> m (a, NextBind t x) Source #

andLater :: t a -> (a -> t b) -> NextBind t b Source #

somewhere :: t a -> NextBind t a Source #

everywhere :: t a -> NextBind t a Source #

immediate :: NextBind t x -> [x] Source #

data Interpretation t m ops a where Source #

Constructors

Direct :: (forall x. t x -> m (Maybe (a, x))) -> Interpretation t m ops a 
Nested :: AST ops b -> (forall x. NextBind t x -> NextBind t x) -> (forall x. m (b, NextBind t x) -> m (a, NextBind t x)) -> Interpretation t m ops a 

class InterpretNextBind t m op where Source #

Methods

interpretNextBind :: op (AST ops) a -> Interpretation t m ops a Source #