Skip to main content

Module functions

Module functions 

Source
Expand description

Auto-generated module

๐Ÿค– Generated with SplitRS

Functionsยง

classify_pattern_ext
Classify a pattern string by its leading token.
count_all_vars
A pattern variable counter.
count_pattern_vars
A depth-first traversal of a pattern tree (string-based).
ctor_arity
Returns the arity of a constructor pattern (number of arguments).
extract_ctor_name
Returns the constructor name from a pattern string.
is_ctor_pattern
Returns true if a pattern string is a constructor application.
is_pair_pattern
Returns true if a pattern is a pair pattern โ€œ(a, b)โ€.
is_wildcard_pattern
Returns true if a pattern string is a wildcard.
normalise_or_pattern
A pattern normaliser that sorts or-patterns.
pattern_depth
A pattern depth counter.
pattern_vars
Returns the variable names bound in a pattern string (simplified: lowercase idents).
same_ctor
Returns true if two patterns have the same structure (same ctor and arity).