| License | BSD-3-Clause |
|---|---|
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Swarm.Game.Step.Const
Description
Implementation of robot commands
Synopsis
- data RobotFailure
- type MoveFailureHandler = MoveFailureMode -> RobotFailure
- data GrabRemoval
- execConst :: (HasRobotStepState sig m, Has Time sig m, Has (Lift IO) sig m) => (Store -> Robot -> Value -> m Value) -> Const -> [Value] -> Store -> Cont -> m CESK
Documentation
data RobotFailure Source #
How to handle failure, for example when moving to blocked location
Constructors
| ThrowExn | |
| Destroy | |
| IgnoreFail |
type MoveFailureHandler = MoveFailureMode -> RobotFailure Source #
How to handle different types of failure when moving/teleporting to a location.
data GrabRemoval Source #
Whether to remove the entity in the world inside the doGrab function
or leave it to be done by other code.
Constructors
| DeferRemoval | |
| PerformRemoval |
Instances
| Eq GrabRemoval Source # | |
Defined in Swarm.Game.Step.Const | |
Arguments
| :: (HasRobotStepState sig m, Has Time sig m, Has (Lift IO) sig m) | |
| => (Store -> Robot -> Value -> m Value) | Need to pass this function as an argument to avoid module import cycle
The supplied function invokes |
| -> Const | |
| -> [Value] | |
| -> Store | |
| -> Cont | |
| -> m CESK |
Interpret the execution (or evaluation) of a constant application to some values.