swarm-0.7.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Swarm.Game.Step.RobotStepState

Description

This exists in its own module so that it can be used by both Swarm.Game.Step.Path.Cache and Swarm.Game.Step.Util without introducing an import cycle.

Synopsis

Documentation

type HasRobotStepState (sig :: (Type -> Type) -> Type -> Type) (m :: Type -> Type) = (Has (State GameState) sig m, Has (State Robot) sig m, Has (Throw Exn) sig m) Source #

All functions that are used for robot step can access GameState and the current Robot.

They can also throw exception of our custom type, which is handled elsewhere. Because of that the constraint is only Throw, but not Catch/Error.