doc: mention x:h@e variant in docstring of x@e (#3073)
This was done in 1c1e6d79a7
[Zulip
thread](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Naming.20equality.20hypothesis.20in.20match.20branch/near/408016140)
This commit is contained in:
parent
d279a4871f
commit
430f4d28e4
2 changed files with 2 additions and 2 deletions
|
|
@ -146,7 +146,6 @@ partial def collect (stx : Syntax) : M Syntax := withRef stx <| withFreshMacroSc
|
|||
```
|
||||
def namedPattern := check... >> trailing_parser "@" >> optional (atomic (ident >> ":")) >> termParser
|
||||
```
|
||||
TODO: pattern variable for equality proof
|
||||
-/
|
||||
let id := stx[0]
|
||||
discard <| processVar id
|
||||
|
|
|
|||
|
|
@ -669,7 +669,8 @@ def isIdent (stx : Syntax) : Bool :=
|
|||
checkStackTop isIdent "expected preceding identifier" >>
|
||||
checkNoWsBefore "no space before '.{'" >> ".{" >>
|
||||
sepBy1 levelParser ", " >> "}"
|
||||
/-- `x@e` matches the pattern `e` and binds its value to the identifier `x`. -/
|
||||
/-- `x@e` or `x:h@e` matches the pattern `e` and binds its value to the identifier `x`.
|
||||
If present, the identifier `h` is bound to a proof of `x = e`. -/
|
||||
@[builtin_term_parser] def namedPattern : TrailingParser := trailing_parser
|
||||
checkStackTop isIdent "expected preceding identifier" >>
|
||||
checkNoWsBefore "no space before '@'" >> "@" >>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue