- state : σ
- activeScopes : NameSet
- delimitsLocal : Bool
- scopeChanged : Bool
Whether this state may differ from the enclosing scope's state because of changes made since this scope was pushed: local entries, entries of namespaces activated in this scope, and
ScopedEnvExtension.modifyState. Popping a scope with this flag set bumps the generation to a fresh value (seePersistentEnvExtensionDescrCore.trackGen) and, for an extension withlogWrites, logsscopeChangedDecls. Only tracked for extensions withDescr.tracksScopes. The declarations of the entries added since this scope was pushed, which popping it removes again; collected only for extensions with
Descr.entryDecl?.
Instances For
- scopedEntries : ScopedEntries β
Instances For
- name : Name
- mkInitial : IO σ
- ofOLeanEntry : σ → α → ImportM β
- toOLeanEntry : β → α
- addEntry : σ → β → σ
- finalizeImport : σ → σ
- exportEntry? : Environment → α → OLeanEntries (Option α)
- trackGen : Bool
See
PersistentEnvExtensionDescrCore.trackGen. - logWrites : Bool
See
EnvExtension.logWrites. The declaration an entry is about. Required with
logWrites: adding an entry and scope operations adding or removing entries log their declarations (Environment.logDeclChange).
Instances For
Whether scope operations that change the effective state must be recorded like content changes;
see State.scopeChanged.
Equations
- descr.tracksScopes = (descr.trackGen || descr.logWrites)
Instances For
Notes on s that the entry b was added to it; see State.scopeChanged.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
- descr : Descr α β σ
- ext : PersistentEnvExtension (Entry α) (Entry β) (StateStack α β σ)
Instances For
Equations
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Modifies delimitsLocal flag to false on the top depth entries of the state stack,
to turn off delimiting of local entries across multiple implicit scope levels
(e.g. those introduced by compound namespace A.B.C expansions).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- ext.addEntry env b = ext.ext.addEntry env (Lean.ScopedEnvExtension.Entry.global b) ext.ext.toEnvExtension.asyncMode Lean.Name.anonymous (Lean.ScopedEnvExtension.writeLog✝ ext b)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
The following function is used to implement end_local_scope command.
By default, all states have delimitsLocal set to true, and the following code modifies only the top element of the stack.
If the top element’s delimitsLocal is false, the function instead traverses down the stack until it reaches the first state where delimitsLocal is true.
Intuitively, delimitsLocal of each State determines whether local entries are delimited. When set to false, it allows traversal through implicit scopes where local entries are not delimited.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- Lean.ScopedEnvExtension.addCore env ext b Lean.AttributeKind.global namespaceName = ext.addEntry env b
- Lean.ScopedEnvExtension.addCore env ext b Lean.AttributeKind.local namespaceName = ext.addLocalEntry env b
- Lean.ScopedEnvExtension.addCore env ext b Lean.AttributeKind.scoped namespaceName = ext.addScopedEntry env namespaceName b
Instances For
Equations
- ext.add b kind = do let ns ← Lean.getCurrNamespace Lean.modifyEnv fun (x : Lean.Environment) => Lean.ScopedEnvExtension.addCore x ext b kind ns
Instances For
Returns the state in effect. For genRecorded, see EnvExtension.getState.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used to implement end_local_scope command, that disables delimiting local entries of ScopedEnvExtension
across depth scope levels.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
Equations
Instances For
- name : Name
- addEntry : σ → α → σ
- initial : σ
- finalizeImport : σ → σ
- exportEntry? : Environment → α → OLeanEntries (Option α)
- trackGen : Bool
See
PersistentEnvExtensionDescrCore.trackGen. - logWrites : Bool
See
EnvExtension.logWrites.
Instances For
Equations
- One or more equations did not get rendered due to their size.