tree-monad-0.3: Non-Determinism Monad for Tree Search

Portabilityportable
Stabilityexperimental
MaintainerSebastian Fischer (sebf@informatik.uni-kiel.de)

Control.Monad.SearchTree

Description

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.

Synopsis

Documentation

data SearchTree a Source

The type SearchTree a represents non-deterministic computations as a tree structure.

Constructors

None 
One a 
Choice (SearchTree a) (SearchTree a) 

data Search a Source

Another search monad based on continuations that produce search trees.

searchTree :: Search a -> SearchTree aSource

Computes the SearchTree representation of a Search action.