Gabriel Ebner
5aab241f7a
fix: show correct popup for a + b
2021-10-26 20:19:27 +02:00
Gabriel Ebner
bfc74decde
feat: add info field to Syntax.node
2021-10-26 20:19:27 +02:00
Leonardo de Moura
fb27537b8e
fix: appUnexpander name resolution
...
fixes issue reported at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Scoping.20for.20delaborator.3F
2021-10-09 08:29:26 -07:00
Leonardo de Moura
3714cf16ec
refactor: lazy evaluation for <|>
...
see #617
2021-09-07 17:06:10 -07:00
Leonardo de Moura
f4ecbd1102
chore: reduce dependencies
2021-08-24 17:38:43 -07:00
Wojciech Nawrocki
81eff794d5
doc: add review comments
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
fd016c6065
chore: address some comments
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
1bab9f6ffc
refactor: simplify delaborator monad stacks
2021-08-24 08:57:41 -07:00
Wojciech Nawrocki
73363bef1f
fix: delab structure field annotations
2021-08-24 08:57:41 -07:00
Daniel Selsam
2f484ec096
feat: build info trees in delab
2021-08-24 08:57:41 -07:00
Leonardo de Moura
3293e9ef08
chore: fix module comments, they must occur after the imports
2021-08-06 14:02:42 -07:00
Daniel Selsam
652681621a
fix: pp.analyze don't type-annotate mdatas
2021-08-03 09:13:18 +02:00
Daniel Selsam
ea6fca24c2
refactor: pp.analyze StateT for analyzeApp
2021-08-03 09:13:18 +02:00
Daniel Selsam
44f1f4e410
refactor: pp.analyze needs pp options
2021-08-03 09:13:18 +02:00
Daniel Selsam
48d5c0d2a6
chore: pp.proofs defaults to false
2021-08-03 09:13:18 +02:00
Daniel Selsam
702211db2a
feat: pp.analyze detect when struct-inst type needed
2021-08-03 09:13:18 +02:00
Daniel Selsam
1f183cdc30
fix: only pp.analyze when all is not set
2021-08-03 09:13:18 +02:00
Daniel Selsam
54146f1859
fix: 4-ary SubExpr repr for types
2021-08-03 09:13:18 +02:00
Daniel Selsam
aa590ccdf5
feat: pp option to instantiate mvars
2021-08-03 09:13:18 +02:00
Daniel Selsam
50d67e77ac
fix: type ascriptions
2021-08-03 09:13:18 +02:00
Daniel Selsam
811bb56d10
fix: never set a negation
2021-08-03 09:13:18 +02:00
Daniel Selsam
89364b802b
feat: top-down heuristic delaboration
2021-08-03 09:13:18 +02:00
Wojciech Nawrocki
f51b80060d
feat: generic tagged Format
2021-08-01 09:58:44 +02:00
Leonardo de Moura
f4a7ffd8c8
chore: fix codebase and tests
2021-06-29 17:14:52 -07: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
Sebastian Ullrich
3f9c015dd4
feat: pp.proofs & pp.proofs.withType
...
Resolves #210
2021-05-14 15:14:58 +02:00
Leonardo de Moura
7eec7b7842
fix: only use .( ... ) when delaborating patterns
2021-05-05 11:12:44 -07:00
Daniel Fabian
0238bf8c33
refactor: use Ordering inside of rbmap instead of lt.
2021-04-27 07:58:58 -07:00
Sebastian Ullrich
62ae39e62b
fix: pp.all should not turn off pp.binder_types
2021-03-23 19:45:41 +01: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
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
79107a2316
feat: copy & store whole ref range in SourceInfo
2021-01-20 16:48:50 +01: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
Sebastian Ullrich
4878f0d13e
fix: delaborator: correctly toggle individual when setting pp.all
2020-12-25 16:12:04 +01:00
Leonardo de Moura
c524bcf2d3
feat: improve universe level pretty printer
2020-12-21 07:34:48 -08:00
Leonardo de Moura
04a07c15b9
chore: use deriving Inhabited
2020-12-13 11:57:59 -08:00
Sebastian Ullrich
e6493755e9
chore: stdlib: match_syntax ~> match
2020-12-08 17:32:02 +01:00
Leonardo de Moura
9d304df757
feat: heterogeneous Append experiment
...
@Kha This one required a bunch of manual fixes. The main issue is that
before we added the string interpolation feature, we created
`MessageData`s using `++` and coercions. For example, given
`(e : Expr)`, we would write
```
let msg : MessageData := "type: " ++ e
```
and rely on the coercions `String -> MessageData` and
`Expr -> MessageData`, and the instance `Append MessageData`.
However, heterogeneous operators "block" the expected type propagation downwards.
This kind of code is obsolete now since we can write a more compact
version using string interpolation
```
let msg := m!"type: {e}"
```
2020-12-01 16:32:41 -08:00
Sebastian Ullrich
d18596d4ca
feat: add Unexpander for delaborating without importing Lean, use for simple notations
...
/cc @leodemoura
2020-12-01 11:57:20 -08:00
Sebastian Ullrich
6d9fcd1d07
fix: renamed references
2020-11-30 14:41:10 +01:00
Sebastian Ullrich
f6816a0ffa
refactor: move & split Lean.Delaborator
2020-11-30 13:52:46 +01:00