astar-monad-0.1.0.0

Safe HaskellSafe
LanguageHaskell2010

Control.Monad.AStar.Class

Synopsis

Documentation

class MonadAStar w r m | m -> r, m -> w where Source #

A class which represents the ability to do A* search.

Methods

branch :: m a -> m a -> m a Source #

Branch the search

updateCost :: w -> m () Source #

Update the cost estimate of the current branch and re-evaluate available branches, switching to a cheaper one when appropriate.

done :: r -> m a Source #

Return a solution and short-circuit any remaining branches.

Instances
(Ord w, Monad m) => MonadAStar w r (AStarT s w r m) Source # 
Instance details

Defined in Control.Monad.AStar

Methods

branch :: AStarT s w r m a -> AStarT s w r m a -> AStarT s w r m a Source #

updateCost :: w -> AStarT s w r m () Source #

done :: r -> AStarT s w r m a Source #