pub enum ErasedExprExt {
BVar(u32),
FVar(String),
Lit(u64),
CtorTag(u32),
Lam(Box<ErasedExprExt>),
App(Box<ErasedExprExt>, Box<ErasedExprExt>),
Const(String),
Let(Box<ErasedExprExt>, Box<ErasedExprExt>),
TypeErased,
Unit,
}Expand description
An erased expression node with only runtime-relevant information.
Variants§
BVar(u32)
A bound variable (De Bruijn index).
FVar(String)
A free variable by name.
Lit(u64)
A literal integer value.
CtorTag(u32)
A constructor tag (for inductive types).
Lam(Box<ErasedExprExt>)
A lambda abstraction.
App(Box<ErasedExprExt>, Box<ErasedExprExt>)
An application.
Const(String)
A global constant reference.
Let(Box<ErasedExprExt>, Box<ErasedExprExt>)
A let binding.
TypeErased
A type-erased placeholder (occurs when types are erased).
Unit
A unit value.
Implementations§
Source§impl ErasedExprExt
impl ErasedExprExt
Sourcepub fn is_type_erased(&self) -> bool
pub fn is_type_erased(&self) -> bool
Return true if this is type-erased.
Trait Implementations§
Source§impl Clone for ErasedExprExt
impl Clone for ErasedExprExt
Source§fn clone(&self) -> ErasedExprExt
fn clone(&self) -> ErasedExprExt
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 ErasedExprExt
impl Debug for ErasedExprExt
Source§impl PartialEq for ErasedExprExt
impl PartialEq for ErasedExprExt
impl Eq for ErasedExprExt
impl StructuralPartialEq for ErasedExprExt
Auto Trait Implementations§
impl Freeze for ErasedExprExt
impl RefUnwindSafe for ErasedExprExt
impl Send for ErasedExprExt
impl Sync for ErasedExprExt
impl Unpin for ErasedExprExt
impl UnsafeUnpin for ErasedExprExt
impl UnwindSafe for ErasedExprExt
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