Sebastian Ullrich
32bea73708
fix: ensure hygiene of double-quoted names
...
Fixes #586
2021-07-30 07:17:50 -07:00
Sebastian Ullrich
5866e2bbb7
chore: use register_parser_alias where possible
...
Fixes #494
2021-07-22 16:28:06 +02:00
Mario Carneiro
c7f5fd6ce4
fix: missing interpolation in trace message
2021-07-15 10:32:37 +02:00
Mario Carneiro
8d616e060b
doc: fix categoryParenthesizer documentation
2021-07-15 09:39:28 +02:00
Leonardo de Moura
f4a7ffd8c8
chore: fix codebase and tests
2021-06-29 17:14:52 -07:00
Daniel Selsam
51d26e1172
feat: unexpanders take priority
2021-06-13 09:33:49 +02:00
Daniel Selsam
ded51882a0
feat: pp motives and misc delab fixes
2021-06-13 00:06:27 +02:00
Sebastian Ullrich
b82b90a687
feat: KeyedDeclAttribute: expose declaration names
2021-06-06 15:32:58 +02:00
Leonardo de Moura
773dcf3f2e
fix: skippingBinders
...
This method was assuming the arguments of a `match` auxiliary
application were lambdas. This is not true for the automatically
generated equation theorems.
2021-05-26 20:09:12 -07:00
Sebastian Ullrich
23f0c1051c
feat: improve ToString/Quote Name
2021-05-19 09:34:01 +02:00
Sebastian Ullrich
3dafe26c72
feat: delab Name.mkStr/Num
2021-05-19 09:21:52 +02:00
Leonardo de Moura
3b7bcdc449
feat: add endPos field to SourceInfo.original
...
We need an update stage0 before we use it.
2021-05-17 14:32:58 -07:00
Sebastian Ullrich
7ca2f70c2f
feat: Eq.rec delaborator
2021-05-14 18:36:59 +02:00
Sebastian Ullrich
3f9c015dd4
feat: pp.proofs & pp.proofs.withType
...
Resolves #210
2021-05-14 15:14:58 +02:00
Sebastian Ullrich
7ec262af66
feat: Eq.ndrec delaborator
2021-05-14 14:59:47 +02:00
Sebastian Ullrich
6f9b80d91c
fix: parenthesizer: avoid panic on partial syntax trees
...
Fixes #446
2021-05-07 09:42:14 +02:00
Leonardo de Moura
7eec7b7842
fix: only use .( ... ) when delaborating patterns
2021-05-05 11:12:44 -07:00
Leonardo de Moura
b4a7d28cff
fix: inconsistent inaccessible annotations
2021-05-05 10:45:38 -07:00
Sebastian Ullrich
456264bf31
chore: pretty printer: tolerate missing better
2021-05-05 14:46:05 +02:00
Leonardo de Moura
a5c28f7dfc
fix: fixes #243
2021-05-03 13:01:16 -07:00
Sebastian Ullrich
73cf3533a1
fix: count quotation depth in parser correctly
2021-04-29 13:33:48 +02:00
Daniel Fabian
0238bf8c33
refactor: use Ordering inside of rbmap instead of lt.
2021-04-27 07:58:58 -07:00
Sebastian Ullrich
e5be9e7dd4
chore: helpers for parser debugging
2021-04-05 10:00:47 +02:00
Leonardo de Moura
a6a008ec5b
feat: use user provided name if available
2021-04-03 12:52:25 -07:00
Sebastian Ullrich
d0996fb945
chore: improve EOI error message
2021-04-03 11:56:26 +02:00
Sebastian Ullrich
62ae39e62b
fix: pp.all should not turn off pp.binder_types
2021-03-23 19:45:41 +01:00
Sebastian Ullrich
725c0c1911
chore: implement lhs prec
2021-03-22 16:33:37 +01:00
Leonardo de Moura
9daed5e91d
chore: add checkLinebreakBefore
2021-03-18 06:43:03 -07:00
Leonardo de Moura
5c24906c60
fix: Delaborator for constants
...
@Kha Could you please take a look at the fix?
This is an example posted by @JasonGross on Zulip.
2021-03-12 19:51:27 -08:00
Leonardo de Moura
bf8119a5cd
chore: convert keywords to snake_case
...
Again `!` is only for functions that can panic.
2021-03-12 13:34:51 -08:00
Leonardo de Moura
be841a7cad
chore: throwError! => throwError, throwErrorAt! => throwErrorAt
...
@Kha I marked the corresponding methods as `protected`.
I currently can't stand `throw_error`, and I am optimistic about
server highlighting feature you are working on :)
2021-03-11 11:59:45 -08:00
Leonardo de Moura
68143ca8ba
chore: trace[...]! ==> trace[...]
...
@Kha I think this one is a good change, there is no real reason for
using the `!` suffix here.
2021-03-10 18:44:43 -08:00
Sebastian Ullrich
1490d095a8
fix: delaborator: bind without lambda
2021-02-16 12:07:46 +01:00
Sebastian Ullrich
19306a844f
chore: delaborator: print BinderInfo.auxDecl as explicit
2021-02-11 12:13:22 +01:00
Sebastian Ullrich
a74960a4ab
fix: delaborator: match with shadowing
2021-02-11 11:30:25 +01:00
Leonardo de Moura
f57c184dbd
chore: remove = true old workarounds
...
@Kha The old `= true` workarounds are not needed anymore, they were
due to another issue and are not related to yesterday's issue.
That is, the one exposed by the `ForIn` typeclass.
2021-02-05 13:48:03 -08:00
Sebastian Ullrich
4772fb5849
feat: delaborator: use ∀ if prop
2021-02-02 13:54:34 +01:00
Sebastian Ullrich
d76378f12e
chore: fix pp.coercions description
...
@leodemoura still unsure about the ideal polarity of some pp options...
2021-01-27 14:46:37 +01:00
Sebastian Ullrich
a3a8d76e96
chore: move pp_options.cpp to Lean
2021-01-27 14:16:12 +01:00
Sebastian Ullrich
1945ebd275
feat: delaborate sorryAx
2021-01-26 12:08:25 +01:00
Leonardo de Moura
ea0fda39bc
chore: Declaration.lean naming convention
...
`Declaration.lean` was one of the first Lean 4 files, and was still
using an old naming convention.
cc @Kha
2021-01-20 17:07:02 -08:00
Sebastian Ullrich
79107a2316
feat: copy & store whole ref range in SourceInfo
2021-01-20 16:48:50 +01:00
Leonardo de Moura
eb25b97501
fix: pattern variables cannot shadow each other
2021-01-16 08:23:45 -08:00
Leonardo de Moura
f73eb1246a
feat: add pp.safe_shadowing
...
When `pp.safe_shadowing` is set to true, we still use the
suggested name if the "body" does not contain a free variable with the
suggested name. This is the approach used in Lean 3, and I think it
improved the result in all affected tests.
The implementation was simple. The only nasty case was `delabAppMatch`.
The main motivation for this feature was hovering information such as
```lean
f : {α_1 : Type} → α_1 → α_1
```
when hovering over the `f` at
```lean
def g (α : Type) (a : α) :=
f a
```
With `safe_shadowing`, we get the nicer
```lean
f : {α : Type} → α → α
```
cc @Kha
2021-01-15 18:53:25 -08:00
Leonardo de Moura
0672247ce8
chore: make comments VS Code friendly
2021-01-15 13:53:37 -08:00
Sebastian Ullrich
4878f0d13e
fix: delaborator: correctly toggle individual when setting pp.all
2020-12-25 16:12:04 +01:00
Leonardo de Moura
0e2e2fc3f6
feat: delaborate ite and dite
2020-12-24 07:30:48 -08:00
Leonardo de Moura
7b813622c6
chore: increase precedence of |>, <|, $ parsers
...
@Kha Now, all parsers defined by `Init/Std/Lean` packages have
precedence >= `min` and <= `max`.
The only exception is `<|>` since it is an infix operator sharead with
the tactic DSL.
BTW, the meaning of `f $ a <|> b` changed with this commit.
It was `f (a <|> b)`, and now is `(f a) <|> b`. The problem is that
the precedence of the `$` parser is now greater than the `<|>` parser.
I will try another experiment where I make sure we do not "reuse"
term infix operators in the tactic DSL.
2020-12-22 14:10:07 -08:00
Sebastian Ullrich
07c7638fd7
feat: token source info antiquotations tk%$id
...
/cc @leodemoura
2020-12-22 13:11:04 +01:00
Leonardo de Moura
c524bcf2d3
feat: improve universe level pretty printer
2020-12-21 07:34:48 -08:00