pub struct DeclarationSurface {
pub kernel_type: Term,
pub binders: Vec<BinderSurface>,
}Expand description
A declared type split into the pure kernel type the context is keyed at and the per-parameter surface information that has to be recorded beside it.
★ ONE CALL AT THE DECLARATION DOOR. Before this, the declaration door read a (Term, usize)
pair and there was nowhere for a default, an auto-param or a non-leading implicit to go – so
Definition f : Int -> (m : Int := 3) -> Int registered a type with a reserved marker still
inside it, which the kernel then refused as an unbound global. Every piece of surface-only
information now leaves the parser through this one struct.
Fields§
§kernel_type: TermThe declared type with every binder marker stripped: what Context is keyed at.
binders: Vec<BinderSurface>One entry per binder of the type’s top-level telescope, outermost first.
Implementations§
Source§impl DeclarationSurface
impl DeclarationSurface
Sourcepub fn param_kinds(&self) -> Vec<ParamKind>
pub fn param_kinds(&self) -> Vec<ParamKind>
The elaborator’s parameter kinds, one per telescope position.
Sourcepub fn leading_implicits(&self) -> usize
pub fn leading_implicits(&self) -> usize
How many LEADING implicit parameters the declaration has – the legacy count model, and
exactly the number TermParser::parse_with_implicits reports.
Sourcepub fn needs_recording(&self) -> bool
pub fn needs_recording(&self) -> bool
Does any binder carry surface information the plain (Term, usize) door would lose?
A declaration for which this is false can be registered exactly as it always was.
Trait Implementations§
Source§impl Clone for DeclarationSurface
impl Clone for DeclarationSurface
Source§fn clone(&self) -> DeclarationSurface
fn clone(&self) -> DeclarationSurface
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more