Maintainer | Benedikt Schmidt <beschmi@gmail.com> |
---|---|
Safe Haskell | None |
Term.Rewriting.Definitions
Description
Term Equalities, Matching Problems, and Subterm Rules.
Equalities
An equality.
evalEqual :: Eq a => Equal a -> BoolSource
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)]Source
Flatten a matching problem to a list of (term,pattern) pairs. If no
matcher exists, then Nothing
is returned.
Arguments
:: a | Term |
-> a | Pattern |
-> Match a | Matching problem. |
Match a term with a pattern.
matchOnlyIf :: Bool -> Match aSource
Ensure that matching only succeeds if the condition holds.