pub enum Declaration {
Axiom {
name: Name,
univ_params: Vec<Name>,
ty: Expr,
},
Definition {
name: Name,
univ_params: Vec<Name>,
ty: Expr,
val: Expr,
hint: ReducibilityHint,
},
Theorem {
name: Name,
univ_params: Vec<Name>,
ty: Expr,
val: Expr,
},
Opaque {
name: Name,
univ_params: Vec<Name>,
ty: Expr,
val: Expr,
},
}Expand description
A declaration in the global environment (legacy format).
Variants§
Axiom
Axiom: postulated type without proof
Fields
Definition
Definition: has a computational value
Fields
§
hint: ReducibilityHintReducibility hint
Theorem
Theorem: like definition but value is a proof (typically opaque)
Fields
Opaque
Opaque: definition that should never be unfolded
Implementations§
Source§impl Declaration
impl Declaration
Sourcepub fn univ_params(&self) -> &[Name]
pub fn univ_params(&self) -> &[Name]
Get the universe parameters.
Sourcepub fn reducibility_hint(&self) -> ReducibilityHint
pub fn reducibility_hint(&self) -> ReducibilityHint
Get the reducibility hint.
Sourcepub fn to_constant_info(&self) -> ConstantInfo
pub fn to_constant_info(&self) -> ConstantInfo
Convert a legacy Declaration to ConstantInfo.
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 moreAuto Trait Implementations§
impl Freeze for Declaration
impl RefUnwindSafe for Declaration
impl Send for Declaration
impl Sync for Declaration
impl Unpin for Declaration
impl UnsafeUnpin 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