pub enum HeadForm {
BVar(u32),
FVar,
Const(Name),
Sort,
Lambda,
Pi,
Lit,
Let,
Proj,
BetaRedex,
}Expand description
The head form of an expression.
Variants§
BVar(u32)
Expression headed by a bound variable.
FVar
Expression headed by a free variable.
Const(Name)
Expression headed by a constant.
Sort
Expression headed by a sort.
Lambda
Expression is a lambda abstraction.
Pi
Expression is a Pi type.
Lit
Expression is a literal.
Let
Expression is a let binding (reducible).
Proj
Expression is a projection.
BetaRedex
Expression is a beta-redex (reducible).
Implementations§
Source§impl HeadForm
impl HeadForm
Sourcepub fn is_reducible(&self) -> bool
pub fn is_reducible(&self) -> bool
Returns true if this head form indicates the expression is reducible.
Sourcepub fn is_variable(&self) -> bool
pub fn is_variable(&self) -> bool
Returns true if this is a variable head.
Sourcepub fn is_neutral(&self) -> bool
pub fn is_neutral(&self) -> bool
Returns true if this is a canonical/neutral form.
Trait Implementations§
impl Eq for HeadForm
impl StructuralPartialEq for HeadForm
Auto Trait Implementations§
impl Freeze for HeadForm
impl RefUnwindSafe for HeadForm
impl Send for HeadForm
impl Sync for HeadForm
impl Unpin for HeadForm
impl UnsafeUnpin for HeadForm
impl UnwindSafe for HeadForm
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