Skip to main content

Module macros

Module macros 

Source
Expand description

Convenience macros for building expressions. Convenience macros for creating symbolic variables, plus the public rewrite-engine and simplification option types.

These macros reduce boilerplate when declaring multiple symbols or symbols with assumptions.

The type re-exports at the bottom of this module (Rule, RuleSet, Bindings, RewriteOpts, RewriteStrategy, Step, ExpandOpts) make the rewrite-rule engine reachable from a stable public path; the prelude re-exports them as well.

Macros§

sym
Declare a symbol with mathematical assumptions.
syms
Declare multiple symbolic variables at once.
vars
Declare multiple symbolic variables at once (alias of syms!).

Structs§

Bindings
Wildcard bindings produced by a successful match: wildcard name → matched sub-expression.
ExpandOpts
Hints controlling Ex::expand_with.
RewriteOpts
Options controlling Ex::rewrite_with.
Rule
A named rewrite rule lhs → rhs over expressions of one Context.
RuleSet
An ordered collection of Rules.
Step
One step of a rewrite or simplification trace.

Enums§

RewriteStrategy
Traversal order used by Ex::rewrite_with.