A pattern binding is a way to bind a subpattern to a name. Not to be confused with pattern binders.
We probably need a better names (having bindings and binders is really confusing and seem arbitrarily assigned).
This adds the syntax "(" Lower-Pattern "as" Identifier ")" (or something similar depending on the precedence and associativity of as).
Example:
thing (value: Duple Nat Foo): Unit =
case value of
duple 0 ((foo \_) as a) => unit
\_ => unit
A pattern binding is a way to bind a subpattern to a name. Not to be confused with pattern binders. We probably need a better names (having bindings and binders is really confusing and seem arbitrarily assigned).
This adds the syntax
"(" Lower-Pattern "as" Identifier ")"
(or something similar depending on the precedence and associativity ofas
).Example: