Recall that the `structure command syntax is
leading_parser (structureTk <|> classTk) >> declId >> many Term.bracketedBinder >> Term.optType >> optional «extends» >> optional (" := " >> optional structCtor >> structFields)
Represents the data of the syntax of a structure field declaration.
- ref : Syntax
- modifiers : Modifiers
- binderInfo : BinderInfo
- declName : Name
- nameId : Syntax
Ref for the field name
- name : Name
The name of the field (without macro scopes).
- rawName : Name
The name of the field (with macro scopes). Used when adding the field to the local context, for field elaboration.
- binders : Syntax
Instances For
- parents : Array StructParentView
- fields : Array StructFieldView
Instances For
Equations
- Lean.Elab.Command.instInhabitedStructView = { default := { toInductiveView := default, parents := default, fields := default } }
Gets the single constructor view from the underlying InductiveView
.
Recall that structure
s have exactly one constructor.
Instances For
Elaborated parent info.
- ref : Syntax
- addTermInfo : Bool
Whether to add term info to the ref. False if there's no user-provided parent projection.
A let variable that represents this structure parent.
- structName : Name
- name : Name
Field name for parent.
- declName : Name
Name of the projection function.
- subobject : Bool
Whether this parent corresponds to a
subobject
field. - type : Expr
Instances For
Equations
- One or more equations did not get rendered due to their size.
Records the way in which a field is represented in a structure.
- newField : StructFieldKind
New field defined by this
structure
. The field is represented as a constructor argument. - copiedField : StructFieldKind
Field that comes from a parent but will be represented as a new field. The field is represented as a constructor argument. Its default value may be overridden.
- fromSubobject : StructFieldKind
Field that comes from a embedded parent field, and is represented within a
subobject
field. Its default value may be overridden. - subobject
(structName : Name)
: StructFieldKind
The field is an embedded parent structure.
Instances For
Equations
Elaborated field info.
- ref : Syntax
- name : Name
- kind : StructFieldKind
- declName : Name
Name of projection function. Remark: for
fromSubobject
fields,declName
is only relevant for auxiliary "default value" functions. - fvar : Expr
Instances For
Equations
Equations
- info.isFromSubobject = match info.kind with | Lean.Elab.Command.StructFieldKind.fromSubobject => true | x => false
Instances For
Equations
- info.isSubobject = match info.kind with | Lean.Elab.Command.StructFieldKind.subobject structName => true | x => false
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
Map from field name to expression representing the field.
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.