A Scope records the part of the CommandElabM state that respects scoping,
such as the data for universe, open, and variable declarations, the current namespace,
and currently enabled options.
The CommandElabM state contains a stack of scopes, and only the top Scope
on the stack is read from or modified. There is always at least one Scope on the stack,
even outside any section or namespace, and each new pushed Scope
starts as a modified copy of the previous top scope.
- header : String
The component of the
namespaceorsectionthat this scope is associated to. For example,section a.b.candnamespace a.b.ceach create three scopes with headers nameda,b, andc. This is used for checking theendcommand. The "base scope" has""as its header. - opts : Options
The current state of all set options at this point in the scope. Note that this is the full current set of options and does not simply contain the options set while this scope has been active.
- currNamespace : Name
The current namespace. The top-level namespace is represented by
Name.anonymous. All currently
opened namespaces and names.The current list of names for universe level variables to use for new declarations. This is managed by the
universecommand.The current list of binders to use for new declarations. This is managed by the
variablecommand. Each binder is represented inSyntaxform, and it is re-elaborated within each command that uses this information.This is also used by commands, such as
#check, to create an initial local context, even if they do not work with binders per se.Globally unique internal identifiers for the
varDecls. There is one identifier per variable introduced by the binders (recall that a binder such as(a b c : Ty)can produce more than one variable), and each identifier is the user-provided variable name with a macro scope. This is used byTermElabMinLean.Elab.Term.Contextto help with processing macros that capture these variables.included section variable names (fromvarUIds)omitted section variable names (fromvarUIds)- isNoncomputable : Bool
If true (default: false), all declarations that fail to compile automatically receive the
noncomputablemodifier. A scope with this flag set is created bynoncomputable section.Recall that a new scope inherits all values from its parent scope, so all sections and namespaces nested within a
noncomputablesection also have this flag set. - isPublic : Bool
True if a
public sectionis in scope. Attributes that should be applied to all matching declaration in the section. Inherited from parent scopes.
Instances For
Equations
- One or more equations did not get rendered due to their size.