Sebastian Ullrich
c3585dbbbb
chore: raw syntax kind accesses
...
Sometimes just checking the kind simply is the simplest solution.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c2166fc602
chore: work around parameterized parser syntax kinds
...
We should find a better solution for calling parameterized parsers such
as `matchAlt` than these helper definitions that confuse the antiquotations.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
d499e67c87
fix: incorrect antiquotation kind annotations
...
Apparently, none of them led to incorrect syntax trees, but `TSyntax`
still disapproves.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
6c64b1b20b
chore: work around for type inference
...
It seems type information often flows from the body to the loop
variable, which is problematic with coercions.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
5e334b3e90
chore: postpone TSyntax adoption for some parts
...
The namespace `TSyntax.Compat` can be opened for a coercion
`Syntax -> TSyntax k` for any `k`, as otherwise this PR would never be done.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
fe22d84143
fix: unclear TSyntax breakage
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
86cd656fc6
refactor: adapt raw syntax manipulations to TSyntax
...
Sometimes there's just no structure to work on
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
498c7a6a97
refactor: remove some unnecessary antiquotation kind annotations
...
These are just the ones I stumbled upon, there should be a lot more now
rendered obsolete by the coercions.
2022-06-27 22:37:02 +02:00
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
f90e4ae30c
feat: more TSyntax API & coercions
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
a12cde41e1
chore: work around macro limitations
...
It would be nice if `macro` was as expressive as syntax quotations, but
right now it's not.
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c202a2c013
feat: more antiquotation kinds
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
7bc95d3a95
chore: update stage0
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
9db8bac040
chore: prepare for next stage
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
d50b1aab89
feat: <|> may produce a choice node of antiquotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
ab08bffbec
chore: Nix: fix stage0-from-input
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
4b78d02a5e
fix: do not discriminate anonymous antiquots after all
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
9b71fbb461
chore: default pp.rawOnError to true for stage 0
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
43ba121e98
feat: upgrade TSyntax to union of kinds
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
3a61cc247e
chore: introduce doSeq antiquotation
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
330245816c
fix: macro: inferred syntax kinds for literal parsers
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
2ef3636022
fix: elaborating category quotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
4588b1ec90
fix: ignore withPosition when binding macro arguments
...
Would be nice to generalize this at some point
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
80a92cceeb
fix: avoid choice nodes with LeadingIdentBehavior.both
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
e6954bb4f3
fix: quote Name.anonymous
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
2c54a0d17a
feat: allow anonymous antiquotations for tacticSeq
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
df499a5b64
feat: early coercion from TSyntax to Syntax
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
c2b4c37792
refactor: make Init.Coe independent of Init.Notation
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
3b3961a89b
chore: disable some anonymous antiquotations
2022-06-27 22:37:02 +02:00
Sebastian Ullrich
8bbae8b8da
feat: introduce TSyntax
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
Sebastian Ullrich
0bd864deca
fix: nesting of pattern info nodes
2022-06-27 22:37:02 +02:00
Leonardo de Moura
6ebae968a7
feat: use IO.getRandomBytes to initialize random seed
...
See https://github.com/leanprover/lean4-samples/pull/2
2022-06-27 13:01:20 -07:00
Leonardo de Moura
f4e083d507
feat: dot notation and aliases
...
This commit addresses the issue raised at
https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Namespace-based.20overloading.20does.20not.20find.20exports/near/282946185
2022-06-27 12:42:25 -07:00
Leonardo de Moura
fc25689f21
feat: add Syntax.eraseSuffix?
2022-06-27 10:30:57 -07:00
Leonardo de Moura
3f0a9eb424
test: add test for issue #1253
...
closes #1253
2022-06-27 09:56:47 -07:00
Leonardo de Moura
c498285d94
chore: add missing double backtick
2022-06-27 09:56:47 -07:00
Sebastian Ullrich
3eeeca22e2
chore: lean-gdb: recursive values & tag
2022-06-26 18:47:47 +02:00
Sebastian Ullrich
5a0c3b8d80
fix: String.isNat
2022-06-25 18:42:08 +02:00
Wojciech Nawrocki
aacfd11508
feat: boolean inequality lemmas
2022-06-25 11:18:09 +02:00
E.W.Ayers
cc9293af09
doc: isDefEq explain mvar levels
2022-06-24 15:24:52 -07:00
Sebastian Ullrich
8979ed42a4
refactor: file worker: wait on header task before dispatching requests
2022-06-24 19:02:00 +02:00
Sebastian Ullrich
e14b4ab0e4
feat: file worker: make header snapshot asynchronous
2022-06-24 19:02:00 +02:00
Leonardo de Moura
220d2e3816
feat: add filterTR and [csimp] theorem
2022-06-24 06:40:38 -07:00
Leonardo de Moura
1fd2b17a92
fix: bug at addDependencies
...
closes #1247
2022-06-24 06:20:00 -07:00
Gabriel Ebner
ec4200fc75
chore: remove unnecessary ppLine
2022-06-24 10:59:55 +02:00
Gabriel Ebner
233a787e65
chore: add test for sepByIndent.formatter
2022-06-24 10:59:55 +02:00
Gabriel Ebner
d5142ddeb8
chore: add sepByIndent.formatter
2022-06-24 10:59:55 +02:00
Gabriel Ebner
733f220ee3
feat: $[...]* antiquotations for sepByIndent
2022-06-24 10:59:55 +02:00