Kim Morrison
09e1a05ee9
chore: cleanup imports ( #5825 )
2024-10-23 23:51:13 +00:00
Kyle Miller
359f60003a
fix: use correct expr positions when delaborating match patterns ( #4034 )
...
In the following, hovering over `true` in the infoview was showing
`Nat.succ y`.
```lean
#check fun (x : Nat) =>
match h : x with
| 0 => false
| y + 1 => true
```
Now hovering over `true` shows `true`.
The issue was that SubExpr positions were not being tracked for
patterns, and the position for a pattern could coincide with the
position for a RHS, putting overwriting terminfo. Now the position given
to a pattern is correct and unique.
Refactors the `match` delaborator, makes it handle shadowing of `h :`
discriminant annotations correctly, and makes it use the standard
`withOverApp` combinator to handle overapplication.
2024-05-01 12:02:10 +00:00
Leonardo de Moura
63067d0d34
chore: code convention ( #4009 )
2024-04-28 15:49:55 +00:00
Henrik Böving
23e49eb519
perf: add prelude to all Lean modules
2024-02-18 14:55:17 -08:00
Marcus Rossel
89d7eb8b78
doc: fix typos/indentation ( #3085 )
2023-12-17 18:41:46 +00:00
Wojciech Nawrocki
e1b3f10250
doc: fix contradictory docstring
2023-07-19 10:53:47 +02:00
Wojciech Nawrocki
c784031dd7
feat: add GoalLocation type
2023-01-13 17:13:02 -08:00
Mario Carneiro
85119ba9d1
chore: move Std.* data structures to Lean.*
2022-09-26 05:46:04 -07:00
Ed Ayers
2a6697e077
feat: goal-diffs ( #1610 )
2022-09-24 11:46:11 +02:00
Mario Carneiro
ebb5b97d73
chore: move Bootstrap.Data -> Lean.Data
2022-08-31 11:48:57 -07:00
Mario Carneiro
bf89c5a0f5
chore: move Std -> Bootstrap
2022-08-29 01:26:12 -07:00
Gabriel Ebner
a8cab84735
refactor: use computed fields for Expr
2022-07-11 14:19:41 -07:00
E.W.Ayers
b6f251bcd3
fix: SubExpr.Pos.toString not terminating
...
fixes 1232
2022-06-19 16:04:50 -07:00
E.W.Ayers
ee6ba180ea
fix: remove fix2
2022-06-17 17:47:51 -07:00
E.W.Ayers
18ba16ded9
feat: string representation of Pos
...
This is needed because JSON will otherwise lossily
convert big nats to floats.
2022-06-17 17:47:51 -07:00
E.W.Ayers
933964f2a4
chore: rm SubExpr.mapPos because it is not useful
2022-06-17 17:47:51 -07:00
E.W.Ayers
114bbc78ed
test: numBinders
2022-06-17 17:47:51 -07:00
E.W.Ayers
4a70143aaf
style: minor formatting changes
2022-06-17 17:47:51 -07:00
E.W.Ayers
0e84f67d99
feat: with pos expr traversal functions
2022-06-17 17:47:51 -07:00
E.W.Ayers
ece1c1085c
feat: add Expr lensing functions using SubExpr.Pos
2022-06-17 17:47:51 -07:00
E.W.Ayers
2fe933cdf5
refactor: make SubExpr.Pos a definition
...
Instead of an abbreviation. It is easier to understand
Pos operations in terms of 'push' and 'pop' rather than
through arithmetic.
2022-06-17 17:47:51 -07:00
E.W.Ayers
d55daf80d4
doc: fix misleading SubExpr docstring
2022-06-06 09:37:51 -07:00
E.W.Ayers
1785ab142e
refactor: move Lean.PrettyPrinter.Delaborator.SubExpr to Lean.SubExpr
...
This is because SubExpr has uses outside the Delaborator.
Closes #1183
2022-06-03 12:38:14 -07:00