Copyright | (c) Peter Lu 2018 |
---|---|
License | GPL-3 |
Maintainer | chippermonky@gmail.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- data Utility g p a where
- Utility :: (g -> p -> (a, g)) -> Utility g p a
- SimpleUtility :: (p -> a) -> Utility g p a
- data UtilityT g p m a where
- data Perception g p where
- Perception :: (g -> p -> (g, p)) -> Perception g p
- SimplePerception :: (p -> p) -> Perception g p
- ConditionalPerception :: (g -> p -> (Bool, g, p)) -> Perception g p
- data PerceptionT g p m where
- PerceptionT :: (g -> p -> m (g, p)) -> PerceptionT g p m
- SimplePerceptionT :: (p -> m p) -> PerceptionT g p m
- ConditionalPerceptionT :: (g -> p -> m (Bool, g, p)) -> PerceptionT g p m
- data Action g p o where
- Action :: (g -> p -> (g, o)) -> Action g p o
- SimpleAction :: (p -> o) -> Action g p o
- data ActionT g p o m where
- ActionT :: (g -> p -> m (g, o)) -> ActionT g p o m
- SimpleActionT :: (p -> m o) -> ActionT g p o m
- data Condition g p where
- data ConditionT g p m where
- ConditionT :: (g -> p -> m (Bool, g)) -> ConditionT g p m
- SimpleConditionT :: (p -> m Bool) -> ConditionT g p m
- data SelfAction g p o where
- SelfAction :: SelfActionable p o => (g -> p -> (g, o)) -> SelfAction g p o
- SimpleSelfAction :: SelfActionable p o => (p -> o) -> SelfAction g p o
- data SelfActionT g p o m where
- SelfActionT :: SelfActionable p o => (g -> p -> m (g, o)) -> SelfActionT g p o m
- SimpleSelfActionT :: SelfActionable p o => (p -> m o) -> SelfActionT g p o m
- fromUtility :: Monad m => Utility g p a -> NodeSequenceT g p o m a
- fromUtilityT :: Monad m => UtilityT g p m a -> NodeSequenceT g p o m a
- fromPerception :: Monad m => Perception g p -> NodeSequenceT g p o m ()
- fromPerceptionT :: Monad m => PerceptionT g p m -> NodeSequenceT g p o m ()
- fromCondition :: Monad m => Condition g p -> NodeSequenceT g p o m ()
- fromConditionT :: Monad m => ConditionT g p m -> NodeSequenceT g p o m ()
- fromAction :: Monad m => Action g p o -> NodeSequenceT g p o m ()
- fromActionT :: Monad m => ActionT g p o m -> NodeSequenceT g p o m ()
- fromSelfAction :: Monad m => SelfAction g p o -> NodeSequenceT g p o m ()
- fromSelfActionT :: Monad m => SelfActionT g p o m -> NodeSequenceT g p o m ()
Documentation
helpers for building NodeSequenceT out of functions
data Utility g p a where Source #
Utility nodes produce a monadic return value and always have state SUCCESS
Utility :: (g -> p -> (a, g)) -> Utility g p a | |
SimpleUtility :: (p -> a) -> Utility g p a |
data Perception g p where Source #
Perception nodes modify the perception
Perception :: (g -> p -> (g, p)) -> Perception g p | |
SimplePerception :: (p -> p) -> Perception g p | |
ConditionalPerception :: (g -> p -> (Bool, g, p)) -> Perception g p |
data PerceptionT g p m where Source #
transformer variant
PerceptionT :: (g -> p -> m (g, p)) -> PerceptionT g p m | |
SimplePerceptionT :: (p -> m p) -> PerceptionT g p m | |
ConditionalPerceptionT :: (g -> p -> m (Bool, g, p)) -> PerceptionT g p m |
data Action g p o where Source #
Action nodes add to the output and always have status SUCCESS
Action :: (g -> p -> (g, o)) -> Action g p o | |
SimpleAction :: (p -> o) -> Action g p o |
data ActionT g p o m where Source #
transformer variant
ActionT :: (g -> p -> m (g, o)) -> ActionT g p o m | |
SimpleActionT :: (p -> m o) -> ActionT g p o m |
data Condition g p where Source #
Condition nodes have status SUCCESS if they return true and FAIL otherwise
data ConditionT g p m where Source #
transformer variant
ConditionT :: (g -> p -> m (Bool, g)) -> ConditionT g p m | |
SimpleConditionT :: (p -> m Bool) -> ConditionT g p m |
data SelfAction g p o where Source #
SelfAction nodes are Action nodes that also apply the action to the perception
SelfAction :: SelfActionable p o => (g -> p -> (g, o)) -> SelfAction g p o | |
SimpleSelfAction :: SelfActionable p o => (p -> o) -> SelfAction g p o |
data SelfActionT g p o m where Source #
transformer variant
SelfActionT :: SelfActionable p o => (g -> p -> m (g, o)) -> SelfActionT g p o m | |
SimpleSelfActionT :: SelfActionable p o => (p -> m o) -> SelfActionT g p o m |
fromUtility :: Monad m => Utility g p a -> NodeSequenceT g p o m a Source #
convert Utility to NodeSequence
fromUtilityT :: Monad m => UtilityT g p m a -> NodeSequenceT g p o m a Source #
convert UtilityT to NodeSequenceT
fromPerception :: Monad m => Perception g p -> NodeSequenceT g p o m () Source #
converts Perception to NodeSequence
fromPerceptionT :: Monad m => PerceptionT g p m -> NodeSequenceT g p o m () Source #
converts PerceptionT to NodeSequenceT
fromCondition :: Monad m => Condition g p -> NodeSequenceT g p o m () Source #
converts Condition to NodeSequence
fromConditionT :: Monad m => ConditionT g p m -> NodeSequenceT g p o m () Source #
converts ConditionT to NodeSequenceT
fromAction :: Monad m => Action g p o -> NodeSequenceT g p o m () Source #
converts Action to NodeSequence
fromActionT :: Monad m => ActionT g p o m -> NodeSequenceT g p o m () Source #
converts ActionT to NodeSequenceT
fromSelfAction :: Monad m => SelfAction g p o -> NodeSequenceT g p o m () Source #
converts SelftAction to NodeSequence WARNING: may be deprecated in a future release
fromSelfActionT :: Monad m => SelfActionT g p o m -> NodeSequenceT g p o m () Source #
converts SelftActionT to NodeSequenceT WARNING: may be deprecated in a future release