Commit graph

11 commits

Author SHA1 Message Date
Sebastian Ullrich
719765ec5c
feat: overhaul meta system (#10362)
This PR refines and clarifies the `meta` phase distinction in the module
system.

* `meta import A` without `public` now has the clarified meaning of
"enable compile-time evaluation of declarations in or above `A` in the
current module, but not downstream". This is now checked statically by
enforcing that public meta defs, which therefore may be referenced from
outside, can only use public meta imports, and that global evaluating
attributes such as `@[term_parser]` can only be applied to public meta
defs.
* `meta def`s may no longer reference non-meta defs even when in the
same module. This clarifies the meta distinction as well as improves
locality of (new) error messages.
* parser references in `syntax` are now also properly tracked as meta
references.
* A `meta import` of an `import` now properly loads only the `.ir` of
the nested module for the purposes of execution instead of also making
its declarations available for general elaboration.
* `initialize` is now no longer being run on import under the module
system, which is now covered by `meta initialize`.
2025-09-17 21:04:29 +00:00
Leonardo de Moura
f63734cba4 chore: unexpanders for Name.mkStr* and Array.mkArray*
closes #1675
2022-10-04 17:18:36 -07:00
Leonardo de Moura
5746338c15 fix: mark Lean.Name.mkStr* functions as [reducible]
This is needed for type checking `TSyntax`.
2022-09-29 17:36:30 -07:00
Gabriel Ebner
34b0b4b7e2 chore: fix tests 2022-08-15 08:55:25 -07:00
Leonardo de Moura
69b7771570 fix: etaArgs and ellipsis at elabAppArgs
When `..` is used, we should not eta-expand but add `_`s.
2022-07-25 18:13:32 -07:00
Gabriel Ebner
b905824024 chore: fix tests 2021-12-15 11:42:38 +00:00
Sebastian Ullrich
3dafe26c72 feat: delab Name.mkStr/Num 2021-05-19 09:21:52 +02:00
Sebastian Ullrich
bbf6c717fc feat: introduce arg precedence 2021-03-22 16:33:37 +01:00
Leonardo de Moura
d30e96bc7d chore: fix tests 2020-11-11 19:09:23 -08:00
Leonardo de Moura
ab2ee0390d chore: fix tests 2020-11-11 10:19:14 -08:00
Leonardo de Moura
2ea9d894e7 fix: SyntaxNodeKind for syntax declarations nested in namespaces
cc @Kha
2020-11-05 15:31:50 -08:00