-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: have app unexpanders be considered before field notation (#4071)
On [Zulip](https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Notation.20in.20namespace.20not.20showing.20in.20pp/near/437016468), Peter Nelson reported that notations that could be pretty printed with generalized field notation did not pretty print using the intended notation. This PR makes it so that app unexpanders are considered before generalized field notation. The complexity before was that we wanted to do parent projection collapse, and since we did the collapse before pretty printing that argument, it meant it wasn't possible to do app unexpanders when there was a field notation candidate. The new solution is to collapse parent projections only when actually considering field notation, which can be done because we can safely strip off projection syntax in an expression-directed way.
- Loading branch information
Showing
3 changed files
with
162 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters