doc: match: mention (generalizing := true)
This commit is contained in:
parent
5f96a9fc4d
commit
6f9c6e4556
1 changed files with 4 additions and 1 deletions
|
|
@ -973,7 +973,10 @@ Pattern matching. `match e, ... with | p, ... => f | ...` matches each given
|
|||
term `e` against each pattern `p` of a match alternative. When all patterns
|
||||
of an alternative match, the `match` term evaluates to the value of the
|
||||
corresponding right-hand side `f` with the pattern variables bound to the
|
||||
respective matched values. -/
|
||||
respective matched values.
|
||||
When not constructing a proof, `match` does not automatically substitute variables
|
||||
matched on in dependent variables' types. Use `match (generalizing := true) ...` to
|
||||
enforce this. -/
|
||||
@[builtinTermElab «match»] def elabMatch : TermElab := fun stx expectedType? => do
|
||||
match stx with
|
||||
| `(match $discr:term with | $y:ident => $rhs:term) =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue