We are considering removing `.` as an alternative for `·` in the
lambda dot notation (e.g., `(·+·)`).
Reasons:
- `.` is not a perfect replacement for `·` (e.g., `(·.insert ·)`)
- `.` is too overloaded: `(f.x)` and `(f .x)` and `(f . x)`. We want to keep the first two.
In the last dev meeting, we have decided we are not going to use it.
We will release often (every month), and use pull requests and issues
to report changes.
This feature produced counterintuitive behavior and confused users.
See discussion at #770.
As pointed out by @tydeu, it is not too much work to write `Id.run <|`
before the `do` when we want to use the `do` notation in pure code.
closes#770
Sebastian suggested moving the macro guide from Mathlib4 upstream into the Lean 4 manual (called `macro_overview.md` here). There was some discussion about where to put it; the section on metaprogramming seemed like the most appropriate place. I did a little bit of reorganizing to make some items more discoverable (e.g. the user-defined notation section).
* add arith
* Fixup based on Sebastian's feedback
* style nits
* add explanation about parsing precedence
* add Sebastian's suggest test case
Add the test case into the example to make sure we parse a*b+c as well
as a+b*c correctly.
* grammar pass
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
* use pretty arrows, 2 spaces, [Arith| ... ]
* typo: :+ and :* had sneaked back in
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com>
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com>
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com>
* Update doc/tutorial/metaprogramming-arith.md
Co-authored-by: Gabriel Ebner <gebner@gebner.org>
* move all #print to #check
Co-authored-by: Sebastian Ullrich <sebasti@nullri.ch>
Co-authored-by: Wojciech Nawrocki <wjnawrocki+gh@protonmail.com>
Co-authored-by: Gabriel Ebner <gebner@gebner.org>