Internals
Types documented for contributors — not part of the stable surface.
MatchMaker.NodePlan — Module
NodePlanPer-node matching plan, indexed by pattern-IR node index. A Moshi ADT — the variant is the match instruction the engine dispatches on.
Extended help
Literal()— match iffisequal.Slot(var_id, optional)— aslot/optionalmarker occurrence.Segment(var_id)— asegmentmarker occurrence.Call(op, head, children)— free head: positional children.SeqCall(op, head, children)— ordered-sequence matching: a contiguous run of subject arguments persegmentchild. Used for an associative-not-commutative head, or any free head whose children include asegment— a node containing a sequence doesn't have to be associative; associativity only adds identity coercion.CommCall(op, head, fixed, slots, optionals, segments)— commutative-not-associative head: children partitioned by kind.ACCall(op, head, fixed, slots, optionals, segments)— AC head: children partitioned by kind.
op is operation(node); head is the node index of a symbolic-head obligation — nonzero when the operation is itself symbolic (including head-slots like slot(f)(x)).
MatchMaker.NetState — Type
NetStateOne trie node of a DiscrimNet — the continuation frontier shared by all patterns whose preorder label prefixes reach it.
Extended help
ops:(op, arity)→ next — deterministic call-head transition.opwilds:arity→ next — head-marker call (slot(f)(…)) — any op.literals: literal leaf expr → next.defers:SeqCall/CommCall/ACCallsubtree edges — confirmiscall+op(nothing= head-marker, any op) + arity bounds, then hand the whole subtree to the engine.wild: slot transition — fires on any subject node (0= none).finals: rule ids whose label sequence ends here.