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 moreSource§impl Debug for DeclarationSurface
impl Debug for DeclarationSurface
Source§impl PartialEq for DeclarationSurface
impl PartialEq for DeclarationSurface
impl StructuralPartialEq for DeclarationSurface
Auto Trait Implementations§
impl Freeze for DeclarationSurface
impl RefUnwindSafe for DeclarationSurface
impl Send for DeclarationSurface
impl Sync for DeclarationSurface
impl Unpin for DeclarationSurface
impl UnsafeUnpin for DeclarationSurface
impl UnwindSafe for DeclarationSurface
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.