-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Non-Determinism Monad for Tree Search -- -- This Haskell library provides an implementation of the MonadPlus type -- class that represents the search space as a tree whose constructors -- represent mzero, return, and mplus. @package tree-monad @version 0.3 -- | This Haskell library provides an implementation of the MonadPlus type -- class that represents the search space as a tree whose constructors -- represent mzero, return, and mplus. -- -- Such a tree can be used to implement different search strategies, -- e.g., by using a queue. It can also be used as a basis for parallel -- search strategies that evaluate different parts of the search space -- concurrently. module Control.Monad.SearchTree -- | The type SearchTree a represents non-deterministic -- computations as a tree structure. data SearchTree a None :: SearchTree a One :: a -> SearchTree a Choice :: (SearchTree a) -> (SearchTree a) -> SearchTree a -- | Another search monad based on continuations that produce search trees. data Search a -- | Computes the SearchTree representation of a Search -- action. searchTree :: Search a -> SearchTree a instance Show a => Show (SearchTree a) instance MonadPlus Search instance Monad Search instance Alternative Search instance Applicative Search instance Functor Search instance MonadPlus SearchTree instance Monad SearchTree instance Alternative SearchTree instance Applicative SearchTree instance Functor SearchTree