You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Manual/ModuleSystem.lean
+2-4Lines changed: 2 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -124,11 +124,9 @@ Thus another use case of `import all` is to make declarations available that nee
124
124
# The `meta` Phase
125
125
126
126
When it comes to actual code execution, there is no point to a definitionwithoutabody.
127
-
Thus, in order to eagerly know what definitions _might_ be executed at compile time and so need to be available including their bodies (in some executable shape), any definitionusedasanentrypointtocompile-timeexecutionhastobetaggedwith the new `meta` modifier[^meta3].
127
+
Thus, in order to eagerly know what definitions _might_ be executed at compile time and so need to be available including their bodies (in some executable shape), any definitionusedasanentrypointtocompile-timeexecutionhastobetaggedwith the new `meta` modifier.
128
128
This is automatically done in built-in metaprogramming syntax such as `syntax`, `macro`, and `elab` but may need to be done explicitly when manually applying metaprogramming attributes such as `@[app_delab]`.
129
129
130
-
[^meta3]: Semantically unrelated to the modifier of the same name in Lean 3.
131
-
132
130
A `meta` definitionmayaccess (and thus invoke) any `meta` or non-`meta` definitionofthecurrentmodule.
133
131
For accessing imported definitions, the definitionmusteitherhavebeenmarkedas `meta` whenitwasdeclaredortheimportmustbemarkedassuch (`meta import` when the accessing definition is in the private scope and `public meta import` otherwise).
134
132
@@ -163,4 +161,4 @@ The following list contains common errors one might encounter when using the mod
163
161
Prefer the former if anyone outside your library might feasible require the same access.
164
162
{keywordOf Lean.reduceCmd}`#reduce` and/or {option}`trace.Meta.isDefEq` can help with finding the blocking definition.
165
163
You might also see this as a kernel error when a tactic directly emits proof terms referencing specific declarations without going through the elaborator, such as for proof by reflection.
166
-
In this case, there is no readily available trace for debugging; consider using `@[expose]section`s generously on the closure of relevant modules.
164
+
In this case, there is no readily available trace for debugging; consider using `@[expose]section`s generously on the closure of relevant modules.
0 commit comments