Leonardo de Moura
49636c531f
feat: add SynthesizeSyntheticMVars.lean
...
Reason: it depends on to include `Tactic.lean`, and `Tactic.lean`
depends on `Term.lean`
2020-01-16 12:58:37 -08:00
Leonardo de Moura
2e68ffb617
fix: missing set s
2020-01-16 11:12:53 -08:00
Leonardo de Moura
4f84f66a8e
fix: elabCommand main loop
2020-01-15 20:53:24 -08:00
Leonardo de Moura
6ff732f698
refactor: move notation comands to Syntax.lean
2020-01-15 20:53:23 -08:00
Leonardo de Moura
ef4f50d6d5
fix: include macroStack and use getBetterRef when reporting IO errors
2020-01-15 20:53:23 -08:00
Leonardo de Moura
8963090142
chore: reduce code duplication
2020-01-15 20:53:23 -08:00
Leonardo de Moura
b9c161b30c
feat: elaborate macro command
2020-01-15 20:53:23 -08:00
Leonardo de Moura
14310f4d5b
chore: improve error message
2020-01-15 20:53:23 -08:00
Leonardo de Moura
2d83d49341
refactor: add Elab/Syntax.lean
2020-01-14 14:22:55 -08:00
Leonardo de Moura
b057f55e52
chore: add missing rules
2020-01-14 14:01:40 -08:00
Sebastian Ullrich
2e5f62d44f
test: parser/macro macros
2020-01-12 10:32:27 -08:00
Sebastian Ullrich
05d216beb0
feat: command elaboration step trace
2020-01-12 10:32:27 -08:00
Sebastian Ullrich
8d021e0cec
fix: fresh macro scope per command
2020-01-12 10:32:27 -08:00
Sebastian Ullrich
437e1b7245
fix: elaboration of macro-generated defs
2020-01-12 10:32:27 -08:00
Sebastian Ullrich
b18e0a3373
feat: support expanding into multiple commands
2020-01-12 10:32:27 -08:00
Simon Hudon
92c8773137
feat: file IO using handles
2020-01-12 08:02:48 -08:00
Leonardo de Moura
6d77aa20aa
feat: catch deep recursion at MetaM, TermElabM and CommandElabM
...
cc @Kha
2020-01-11 15:03:58 -08:00
Leonardo de Moura
82a36fbfe2
feat: declare_syntax_cat without importing Init.Lean
...
cc @Kha
2020-01-11 09:02:50 -08:00
Leonardo de Moura
e817257922
feat: elaborate declare_syntax_cat
...
TODO: `registerParserCategory` uses `registerAttribute` which relies
on the environment having a declaration of type `AttributeImpl`.
This is bad since forces users to import `Init.Lean`.
@Kha The key problem is that we cannot serialize `AttributeImpl`.
I will try to address this issue tomorrow. I am considering different
workarounds.
2020-01-10 21:10:02 -08:00
Leonardo de Moura
48600dbbfc
refactor: registerAttribute ==> registerBuiltinAttribute
2020-01-10 17:08:12 -08:00
Leonardo de Moura
f783115d21
refactor: SyntaxNode => Syntax at TermElab and CommandElab
...
@Kha It is too annoying to write `.val` all over the place. Moreover,
we now have `match_syntax`.
2020-01-10 15:17:58 -08:00
Leonardo de Moura
f73ff914eb
feat: extensible elaboration functions
...
@kha `termParserAttr.lean` has a small example
2020-01-10 15:05:14 -08:00
Leonardo de Moura
2a8e179a64
feat: add #synth command to new frontend
2020-01-09 09:54:45 -08:00
Leonardo de Moura
923bd321ef
chore: remove unnecessary commands
2020-01-09 09:45:07 -08:00
Leonardo de Moura
2ce2610c0a
feat: add compileDecl
...
cc @kha
2020-01-07 16:38:41 -08:00
Leonardo de Moura
a17ae70be7
feat: elaborate set_option
2020-01-07 12:08:00 -08:00
Leonardo de Moura
070682c4e9
feat: add addContext
2020-01-07 11:04:52 -08:00
Leonardo de Moura
0afd970e15
feat: add declName? to TermElabM context
2020-01-06 15:10:24 -08:00
Sebastian Ullrich
bc0802d76c
refactor: test quotations in command elab
2020-01-06 10:09:26 -08:00
Sebastian Ullrich
9b6eeacc0f
feat: add macro stack tracking to command elab
2020-01-06 10:09:26 -08:00
Leonardo de Moura
0231841984
feat: applyAttributes
2020-01-05 16:22:46 -08:00
Leonardo de Moura
a24838dd7c
feat: add addDecl
2020-01-05 15:01:56 -08:00
Leonardo de Moura
26c386d756
chore: univNames ==> levelNames
2020-01-05 14:49:16 -08:00
Leonardo de Moura
7fd55477b2
feat: add sortDeclLevelParams
2020-01-05 14:35:14 -08:00
Leonardo de Moura
f827086f85
feat: elaborate definition type
2020-01-04 16:32:24 -08:00
Leonardo de Moura
93dbcc161a
refactor: break Declaration.lean into smaller files
2020-01-04 13:31:25 -08:00
Leonardo de Moura
6ca9a8c170
feat: better runTermElabM
2020-01-04 13:08:21 -08:00
Sebastian Ullrich
042f65fc69
feat: track macro scopes in CommandElab and synchronize them with TermElab
2020-01-04 09:41:45 -08:00
Leonardo de Moura
eb9d793e79
feat: def-like elaboration skeleton
2020-01-04 08:48:00 -08:00
Leonardo de Moura
bc7455e04e
refactor: CommandElabM and FrontendM in IO
2020-01-03 18:15:45 -08:00
Leonardo de Moura
54fd9a2e4a
chore: naming convention
2020-01-03 12:12:45 -08:00
Leonardo de Moura
6c04a4bcc3
feat: mkElabAttribute
2020-01-01 10:59:29 -08:00
Leonardo de Moura
90178dc3d9
feat: add syntaxNodeKindExtension
...
It contains all `SyntaxNodeKind`s registered in the system.
2019-12-31 16:36:50 -08:00
Leonardo de Moura
ef8e63a47c
refactor: trace directly to MessageLog at Elab monads
...
Motivation: better position information, and it is simpler (e.g., no `tracingAt`)
2019-12-22 09:58:31 -08:00
Leonardo de Moura
9d53fa701c
chore: combine MessageData.context + MessageData.withOptions into MessageData.context
2019-12-22 09:15:04 -08:00
Leonardo de Moura
76d351d830
refactor: split Elab/Term.lean into smaller files
2019-12-19 07:26:54 -08:00
Leonardo de Moura
00cc28096c
feat: add support for postponing elabTerm
2019-12-18 11:05:02 -08:00
Leonardo de Moura
067dca5a65
chore: naming convention
2019-12-15 18:28:00 -08:00
Leonardo de Moura
248cc2ec3a
chore: naming convention
2019-12-15 07:48:42 -08:00
Leonardo de Moura
be50f24d64
chore: cleanup
2019-12-12 15:41:02 -08:00