Copyright | (c) 2010-2012 Benedikt Schmidt Simon Meier |
---|---|
License | GPL v3 (see LICENSE) |
Maintainer | Benedikt Schmidt <beschmi@gmail.com> |
Safe Haskell | Safe |
Language | Haskell98 |
Term.Rewriting.Definitions
Description
Term Equalities, Matching Problems, and Subterm Rules.
Equalities
An equality.
evalEqual :: Eq a => Equal a -> Bool #
True iff the two sides of the equality are equal with respect to their
Eq
instance.
Matching problems
Matching problems. Use the Monoid
instance to compose matching
problems.
Constructors
NoMatch | No matcher exists. |
DelayedMatches [(a, a)] | A bunch of delayed (term,pattern) pairs. |
flattenMatch :: Match a -> Maybe [(a, a)] #
Flatten a matching problem to a list of (term,pattern) pairs. If no
matcher exists, then Nothing
is returned.
matchOnlyIf :: Bool -> Match a #
Ensure that matching only succeeds if the condition holds.