Sebastian Ullrich
a78302243c
refactor: strengthen Syntax signatures
...
Most notable change: `Quote` is now parameterized by the target kind.
Which means that `Name` etc. could actually have different
implementations for quoting into `term` and `level`, if that need ever
arises.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
7d48d125da
fix: store syntax kinds of parser aliases in order to construct correct antiquotations in macro and elab
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
292d24ba19
feat: always store quoted kind in antiquotation kind
2022-06-27 22:37:02 +02:00
Wojciech Nawrocki
7624e25de0
fix: don't duplicate tags in formatter
2022-06-18 10:07:53 +02:00
Wojciech Nawrocki
b1ef58d3cc
fix: tag idents so that ofFieldInfo nodes are preserved
2022-06-18 10:07:53 +02:00
E.W.Ayers
0e84f67d99
feat: with pos expr traversal functions
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
Sebastian Ullrich
ce054fb2e7
fix: introduce semicolonOrLinebreak, replace many(1) with sepBy(1) where appropriate
2022-06-16 23:33:57 +02:00
Leonardo de Moura
f6d1e48cb8
fix: constant => opaque issues
2022-06-14 17:19:54 -07:00
Leonardo de Moura
02c4e548df
feat: replace constant with opaque
2022-06-14 17:02:59 -07:00
Leonardo de Moura
77ae79be46
chore: use let/if in do blocks
2022-06-13 17:10:14 -07:00
Leonardo de Moura
e52a7bdf42
feat: let/if indentation in do blocks
...
closes #1120
2022-06-13 16:18:49 -07:00
Leonardo de Moura
041827bed5
chore: unused variables
2022-06-07 17:54:10 -07:00
Sebastian Ullrich
8eefbf5227
chore: further clean up refactored code
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
fb2a2b3de2
fix: fixup previous commit
2022-06-07 16:37:45 -07:00
Sebastian Ullrich
ae7b895f7a
refactor: unname some unused variables
2022-06-07 16:37:45 -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
Wojciech Nawrocki
9c9407e722
feat: propagate tagAppFns in delaborator
2022-05-31 00:07:56 +02:00
Sebastian Ullrich
952abbf16b
chore: remove obsolete workaround
2022-05-01 11:52:53 +02:00
Sebastian Ullrich
4174643dbd
perf: optimize withAntiquot parenthesizer
...
Doesn't look like we'll get rid of the backtracking anytime soon
2022-05-01 11:52:53 +02:00
Leonardo de Moura
8d9626dab7
feat: delaborate match h : d with ...
2022-04-29 07:17:46 -07:00
Sebastian Ullrich
0a88f68d39
chore: finish with_annotate_state implementation
2022-04-29 16:16:09 +02:00
Leonardo de Moura
3cf425ba52
fix: pattern hover information
...
We annotate patterns with the corresponding `Syntax` during
elaboration, and do not populate the info tree. Reason: the set of
pattern variables is not known during pattern elaboration.
2022-04-08 15:03:42 -07:00
Leonardo de Moura
152eff5cea
chore: missing double ticks
2022-04-08 15:01:57 -07:00
Leonardo de Moura
37b321229f
feat: make sure hover information does not include @ for constants
2022-04-07 18:40:04 -07:00
Leonardo de Moura
55989c25fc
chore: remove unnecessary args
2022-04-07 18:19:15 -07:00
Leonardo de Moura
de2e2447d2
chore: style
2022-04-07 17:35:05 -07:00
Sebastian Ullrich
24697026e8
feat: always accept antiquotations, simplify quotDepth code
2022-04-06 19:43:07 +02:00
Leonardo de Moura
46ce3013d0
feat: cleanup local context before elaborating match alternatives RHS
2022-03-29 18:52:07 -07:00
Leonardo de Moura
3862e7867b
refactor: make String.Pos opaque
...
TODO: this refactoring exposed bugs in `FuzzyMatching` and `Lake`
closes #410
2022-03-20 10:47:13 -07:00
Leonardo de Moura
90c442da76
feat: add internal option for communicating to the delaborator that input term is a pattern
2022-03-16 07:50:29 -07:00
Leonardo de Moura
5825eb394f
refactor: move isOutParam to Expr.lean, rename consumeAutoOptParam => consumeTypeAnnotations
2022-03-10 07:37:41 -08:00
Leonardo de Moura
1f2618adba
feat: delaborate cond using bif-then-else
2022-03-03 07:41:39 -08:00
Leonardo de Moura
93b5b74b36
feat: modify notation for providing motive in "match" expressions
2022-02-14 15:36:14 -08:00
Sebastian Ullrich
894dc0e1b8
fix: pretty-printing match dependent on let
2022-02-10 10:19:04 +01:00
Leonardo de Moura
12e2a79170
chore: fix codebase after removing auto pure
2022-02-03 18:08:14 -08:00
Leonardo de Moura
cf3b8d4eb4
chore: cleanup
...
Make the code style more uniform.
We still have a lot of leftovers from the old frontend.
2022-01-26 09:18:17 -08:00
Leonardo de Moura
3c17755730
chore: prepare to remove coe definitions
...
The notation `↑ e` will eagerly expand the coersion.
See #403
2022-01-20 15:07:54 -08:00
Leonardo de Moura
a21265281b
chore: remove temporary workaround
2022-01-18 14:11:54 -08:00
Leonardo de Moura
1c1e6d79a7
feat: add equality proof for named patterns
...
The user can optionally name the equality proof.
The new test demostrates how to name the equality proof.
closes #501
2022-01-18 12:43:01 -08:00
Leonardo de Moura
6631f1d5b3
chore: use namedPatternOld
2022-01-17 17:18:03 -08:00
Leonardo de Moura
bac91b9b5b
chore: remove arbitrary
2022-01-15 12:14:27 -08:00
Gabriel Ebner
50abc3e295
fix: correctly pretty-print @Eq
2022-01-12 09:41:41 +01:00
Gabriel Ebner
bdc80ce50d
fix: potential nontermination in delabFor
2022-01-12 09:41:41 +01:00
Gabriel Ebner
9132b27e80
fix: delabAppImplicit: strip mdata from function
2022-01-12 09:41:41 +01:00
Leonardo de Moura
a02421185c
fix: add support for BinderInfo.auxDecl at delabLam
2022-01-10 15:18:49 -08:00
Henrik Böving
4ee058039b
chore: apply suggestions from code review
...
Co-authored-by: Gabriel Ebner <gebner@gebner.org>
2022-01-03 13:43:33 +01:00
Henrik Böving
5d3e3b9296
fix: don't drop tags in identNoAntiquot
2022-01-03 13:43:33 +01:00
Henrik Böving
6fe010d0c2
fix: keep info in auto generated notation delaborators
...
Previously automatically generated delaborators for syntax declared with
the notation (and derived) keywords would silently drop information
during delaboration.
2022-01-03 13:43:33 +01:00
Henrik Böving
cbedff5aba
feat: optionally add information to all symbols during delaboration
...
Add an option called pp.tagSymbols which, if set, makes the
delaborator add term information to all symbols it can during
delaboration. This option is disabled per default because it would
break the LSP server's hovering behaviour. It is however useful
when for example automatically generating interactive documentation.
2022-01-03 13:43:33 +01:00