mini-egison-0.1.6: Template Haskell Implementation of Egison Pattern Matching

Safe HaskellNone
LanguageHaskell2010

Control.Egison.Match

Description

Pattern-matching expressions.

Synopsis

Documentation

matchAll :: Matcher m a => a -> m -> [MatchClause a m b] -> [b] Source #

matchAll takes a target, a matcher, and a list of match clauses. matchAll collects all the pattern-matching results and returns a list of the results evaluating the body expression for each pattern-matching result. matchAll traverses a search tree for pattern matching in breadth-first order.

match :: Matcher m a => a -> m -> [MatchClause a m b] -> b Source #

match takes a target, a matcher, and a list of match clauses. match calculates only the first pattern-matching result and returns the results evaluating the body expression for the first pattern-matching result. match traverses a search tree for pattern matching in breadth-first order.

matchAllDFS :: Matcher m a => a -> m -> [MatchClause a m b] -> [b] Source #

matchAllDFS is much similar to matchAll but traverses a search tree for pattern matching in depth-first order.

matchDFS :: Matcher m a => a -> m -> [MatchClause a m b] -> b Source #

matchDFS is much similar to match but traverses a search tree for pattern matching in depth-first order.