pub struct Declaration {
pub name: SymbolId,
pub level_params: Vec<u32>,
pub ty: TermId,
pub value: Option<TermId>,
pub attrs: Attributes,
pub kind: DeclKind,
}Expand description
A constant declaration in the environment
Fields§
§name: SymbolIdName of the constant
level_params: Vec<u32>Universe parameters
ty: TermIdType of the constant
value: Option<TermId>Value (body) of the constant (None for axioms)
attrs: AttributesAttributes
kind: DeclKindKind of declaration
Implementations§
Source§impl Declaration
impl Declaration
Sourcepub fn def(
name: SymbolId,
level_params: Vec<u32>,
ty: TermId,
value: TermId,
) -> Self
pub fn def( name: SymbolId, level_params: Vec<u32>, ty: TermId, value: TermId, ) -> Self
Create a new definition
Sourcepub fn theorem(
name: SymbolId,
level_params: Vec<u32>,
ty: TermId,
proof: TermId,
) -> Self
pub fn theorem( name: SymbolId, level_params: Vec<u32>, ty: TermId, proof: TermId, ) -> Self
Create a new theorem (opaque definition)
Sourcepub fn is_reducible(&self) -> bool
pub fn is_reducible(&self) -> bool
Check if this declaration can be unfolded
Trait Implementations§
Source§impl Clone for Declaration
impl Clone for Declaration
Source§fn clone(&self) -> Declaration
fn clone(&self) -> Declaration
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Declaration
impl Debug for Declaration
Source§impl PartialEq for Declaration
impl PartialEq for Declaration
impl Eq for Declaration
impl StructuralPartialEq for Declaration
Auto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnwindSafe for Declaration
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
Mutably borrows from an owned value. Read more