Leonardo de Moura
c65537aea5
feat: Option is a Monad again
...
TODO: remove `OptionM` after update stage0
see: https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Do.20we.20still.20need.20OptionM.3F/near/279761084
2022-05-04 15:27:42 -07:00
Mario Carneiro
f37b700e6e
fix: use correct number of none patterns for antiquotation splice
2022-04-27 09:55:27 +02:00
Sebastian Ullrich
a2baf2cb96
refactor: split term/command quotations
2022-04-15 08:50:46 -07:00
Sebastian Ullrich
faedfbe651
fix: antiquotation splices early in bootstrapping
2022-03-21 17:44:15 +01:00
Leonardo de Moura
12e2a79170
chore: fix codebase after removing auto pure
2022-02-03 18:08:14 -08:00
Sebastian Ullrich
f9ff9ab3fd
doc: move documentation on syntax match semantics to elaborator docstring
2022-01-29 08:40:03 -08:00
Sebastian Ullrich
ce58ded16f
fix: syntax match of literals
...
Fixes #801
2022-01-29 08:40:03 -08:00
Leonardo de Moura
68bd55af32
chore: fix codebase
2021-12-10 13:12:09 -08:00
Sebastian Ullrich
4063729b6c
doc: document some built-in term notations
2021-11-26 17:13:19 +01:00
Gabriel Ebner
bfc74decde
feat: add info field to Syntax.node
2021-10-26 20:19:27 +02:00
Gabriel Ebner
b74db2d902
feat: update macros for extra info field
2021-10-26 20:19:27 +02:00
Leonardo de Moura
d7537f252a
chore: remove unnecessay parser/elab
2021-09-02 17:29:32 -07:00
Leonardo de Moura
2166057d47
chore: add elab_stx_quot for conv
2021-09-01 15:56:14 -07:00
Leonardo de Moura
6d8058034a
chore: basic conv mode parsers
2021-09-01 15:35:32 -07:00
Leonardo de Moura
1be41f2adb
chore: fix stdlib
2021-08-06 12:58:58 -07:00
Sebastian Ullrich
98634b5554
fix: $(_):ident is not an infallible pattern
2021-07-22 16:52:06 +02:00
Sebastian Ullrich
eb1e285e26
chore: style
2021-06-21 10:17:26 -07:00
Sebastian Ullrich
cc2f483951
chore: note on previous commit
2021-06-10 18:25:39 +02:00
Sebastian Ullrich
e4bf5977d9
fix: syntax pattern match against multiple identifiers
2021-06-10 18:15:40 +02:00
Leonardo de Moura
8b4cdcfddd
chore: fix mutable variable shadowing
2021-05-22 19:24:41 -07:00
Sebastian Ullrich
7c3101a51c
chore: produce more efficient/pp-able array code from quotations
2021-05-19 09:52:35 +02:00
Sebastian Ullrich
088774536e
fix: syntax match: do not discard other patterns after splices
2021-05-07 16:08:10 +02:00
Leonardo de Moura
dd325cfffc
fix: getHeadInfo ==> getHeadInfo?
...
The generated code was not producing compilation errors because we
have a coercion from `A` to `Option A`
2021-05-04 16:46:41 -07:00
Leonardo de Moura
78a2de4241
feat: better error recovery for match syntax
2021-05-02 17:00:35 -07:00
Leonardo de Moura
59b1f8c143
chore: avoid match_syntax in error messages
2021-05-02 17:00:35 -07:00
Sebastian Ullrich
ad7ee2c81b
fix: disable quotation precheck if hygiene is false
2021-04-27 16:38:37 -07:00
Sebastian Ullrich
8119daeb18
feat: syntax & attribute for double-quoted quotations
2021-04-27 16:38:37 -07:00
Leonardo de Moura
3a80e87793
chore: #405 step 1
2021-04-22 20:03:48 -07:00
Leonardo de Moura
f6651605d0
chore: remove unnecessary modification, fun syntax is not a binder
2021-04-15 12:38:48 -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
1e61b7db89
fix: partial syntax tree panic
...
Fixes #391
2021-04-12 18:33:39 +02:00
Leonardo de Moura
ca314f1aa4
refactor: add helper functions for match syntax elaborator
2021-04-06 19:02:03 -07:00
Leonardo de Moura
9fa89a73df
feat: add helper functions for syntax match
...
Motivation: improve error recovery.
2021-04-05 18:38:57 -07:00
Sebastian Ullrich
dbefb7dd5f
feat: support $_ antiquotations in match
2021-03-23 19:07:42 +01:00
Leonardo de Moura
04e3f21783
chore: add OptionM monad
...
Motivation: `Option` is data, `OptionM` is control.
2021-03-20 17:50:45 -07:00
Sebastian Ullrich
54405c4543
fix: automatically wrap many/sepBy items in null nodes where necessary
2021-03-19 15:15:55 +01:00
Leonardo de Moura
12aa5cc461
chore: avoid ! in keywords
2021-03-13 17:24: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
e7140959c4
chore: add elaborator for let_fun and let_delayed
2021-03-11 10:40:25 -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
8320ab6177
fix: syntax match: check identifiers (using strict equality)
2021-02-11 17:50:05 +01:00
Sebastian Ullrich
811b90dd0e
feat: option for disabling hygiene
...
/cc @leodemoura
2021-01-29 15:26:06 +01:00
Sebastian Ullrich
446f953461
feat: allow hygienic capture of section variables in quotations
2021-01-24 11:46:04 -08:00
Leonardo de Moura
0672247ce8
chore: make comments VS Code friendly
2021-01-15 13:53:37 -08:00
Sebastian Ullrich
d1ff0991f4
fix: copy position for identifiers in quotations, not just for atoms
2021-01-15 16:27:59 +01:00
Sebastian Ullrich
bbafd80322
chore: token antiquotations: return/take full Syntax (but only use head info of it)
...
/cc @leodemoura
2020-12-26 23:54:46 +01:00
Sebastian Ullrich
82497e3bcf
fix: non-atomic identifiers in antiquotation splices
2020-12-25 22:58:33 +01:00
Sebastian Ullrich
c3c27f8dd3
feat: lift restriction on number of antiquotations in splice
...
/cc @leodemoura
2020-12-25 18:41:03 +01:00
Leonardo de Moura
79c15de131
fix: if-then-else is not builtin notation
2020-12-24 08:02:59 -08:00
Sebastian Ullrich
93518d4e42
perf: let*-bind syntax match RHSs before duplicating them
2020-12-22 17:25:46 +01:00