Skip to main content

Module pattern

Module pattern 

Source
Expand description

Pure pattern matching: test a Value against an AST Pattern, extract bindings.

This module provides match_pattern, a pure function that structurally matches a runtime value against a pattern and returns extracted bindings on success. Guards are not evaluated here — that is handled by the match-expression evaluator which calls this function first.

Functions§

match_pattern
Attempt to match value against pattern.

Type Aliases§

Binding
A single extracted binding: variable name → matched value.