Copyright | Sebastian Fischer |
---|---|
License | BSD3 |
Maintainer | Niels Bunkenburg (nbu@informatik.uni-kiel.de) |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- data SearchTree a
- = None
- | One a
- | Choice (SearchTree a) (SearchTree a)
- data Search a
- searchTree :: Search a -> SearchTree a
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) |
Instances
Another search monad based on continuations that produce search trees.
searchTree :: Search a -> SearchTree a Source #
Computes the SearchTree
representation of a Search
action.