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
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
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
2ef3636022
fix: elaborating category quotations
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
8bbae8b8da
feat: introduce TSyntax
2022-06-27 22:37:02 +02:00
Leonardo de Moura
77ae79be46
chore: use let/if in do blocks
2022-06-13 17:10:14 -07:00
Leonardo de Moura
041827bed5
chore: unused variables
2022-06-07 17:54:10 -07:00
Sebastian Ullrich
24697026e8
feat: always accept antiquotations, simplify quotDepth code
2022-04-06 19:43:07 +02:00
Leonardo de Moura
fdd1cb5751
chore: remove workarounds for #1090
2022-04-01 11:28:17 -07:00
Leonardo de Moura
799c701f56
fix: inconsistency between syntax and kind names
...
TODO: remove staging workarounds
see #1090
2022-04-01 11:20:16 -07:00
Leonardo de Moura
68acfc7fb9
chore: prepare for #1090
2022-04-01 11:11:28 -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
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
Gabriel Ebner
bfc74decde
feat: add info field to Syntax.node
2021-10-26 20:19:27 +02:00
Sebastian Ullrich
51a41705cb
feat: allow more atoms starting with "`"
2021-10-19 14:10:31 +02:00
Gabriel Ebner
d379cd6853
fix: out-of-bounds array access
2021-10-19 12:13:17 +02:00
Leonardo de Moura
f43ab76641
feat: doc string for syntax abbreviations
2021-09-12 18:26:36 -07:00
Leonardo de Moura
d67c633ca1
feat: allow user to set "behavior" at declare_syntax_cat
2021-09-01 13:28:12 -07:00
Sebastian Ullrich
0b3e548672
fix: syntax tree returned by syntax elaborator
2021-08-10 12:02:04 +02:00
Leonardo de Moura
a821dcbff2
chore: enforce naming convention for theorems
...
see issue #402
fix: `ElabTerm.lean`
2021-08-07 12:48:38 -07:00
Leonardo de Moura
6e2b7189e8
fix: fixes #242
2021-08-06 18:39:55 -07:00
Sebastian Ullrich
2833c61a60
fix: respect preresolved names at resolveConst*
...
This makes sure we can properly quote e.g. `deriving` clauses and avoids
a suspicious `eraseMacroScopes` call (though not at `Elab.Syntax`, since
categories do not have to be declaration names)
2021-07-30 07:17:50 -07:00
Leonardo de Moura
e5d4af5e75
refactor: split Syntax.lean
2021-06-28 13:52:04 -07:00
Leonardo de Moura
953dd85c06
chore: avoid inline
2021-06-28 10:17:01 -07:00
Sebastian Ullrich
65f2874d86
chore: address reviews
2021-06-21 10:17:26 -07:00
Sebastian Ullrich
91e3100e30
fix: properly resolve syntax kinds in macro/elab_rules
2021-06-21 10:17:26 -07:00
Sebastian Ullrich
3f4ab0a2af
feat: implement elab_rules
...
TODO: infer category from quotation type
2021-06-21 10:17:26 -07:00
Sebastian Ullrich
9101c9d5da
feat: support docstrings on syntax/macro/...
2021-06-21 10:17:26 -07:00
Leonardo de Moura
89373bd64f
fix: fixes #447
2021-05-08 19:04:12 -07:00
Leonardo de Moura
56c7454a8d
fix: fixes #435
2021-05-02 18:16:57 -07:00
tydeu
44f45f426c
feat: add scoped macro_rules ( #432 )
2021-04-30 09:05:09 +02:00
Sebastian Ullrich
f0960b7f89
fix: ignore antiquotations outside quotations
2021-04-29 13:33:48 +02:00
Sebastian Ullrich
9f0fa19237
feat: notation: unfold to prechecked quotation
2021-04-27 16:38:37 -07:00
Sebastian Ullrich
d15e2b3756
refactor: make notation and macro macros again
2021-04-24 11:25:08 +02:00
Leonardo de Moura
09d438ca1d
chore: enforce notation parameter naming convention
2021-04-19 18:54:09 -07:00
Leonardo de Moura
aaca889bea
fix: fixes #414
2021-04-19 15:02:26 -07:00
Leonardo de Moura
dbc84c502c
chore: make sure we don't lift methods over binders
2021-04-15 12:06:46 -07:00
Sebastian Ullrich
a0eff55772
fix: unhygiene in synthesized notation unexpander
2021-03-23 19:08:06 +01:00
Sebastian Ullrich
ed9c3ba525
doc: LHS precedences
2021-03-22 16:33:37 +01:00
Sebastian Ullrich
cd4cd581be
feat: make infix non-associative
2021-03-22 16:33:37 +01:00
Sebastian Ullrich
3d90850fdd
feat: add syntax for specifying LHS precedence on trailing parsers
2021-03-22 16:33:36 +01:00
Sebastian Ullrich
29c7db3ed2
feat: term info at many more constants
2021-03-20 08:31:06 -07:00
Sebastian Ullrich
d35fc280d2
refactor: further refactor Lean.Elab.Syntax
2021-03-13 14:47:59 +01:00
Sebastian Ullrich
00a0db4231
fix: unexpanders should inherit scopedness
2021-03-13 13:20:12 +01: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
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
164577d94e
chore: remove parser! and tparser!
...
The new macros are called "leading_parser` and `trailing_parser`.
cc @Kha
2021-03-11 09:36:58 -08:00
Sebastian Ullrich
b69060f350
fix: category quotations in term position
2020-12-29 11:16:34 +01:00