pub enum TermKind {
Sort(LevelId),
Const(SymbolId, Vec<LevelId>),
Var(u32),
App(TermId, TermId),
Lam(Binder, TermId),
Pi(Binder, TermId),
Let(Binder, TermId, TermId),
MVar(MetaVarId),
Lit(Literal),
}Expand description
Core term representation
Variants§
Sort(LevelId)
Universe sort (Type u)
Const(SymbolId, Vec<LevelId>)
Constant reference (name + universe parameters)
Var(u32)
Bound variable (de Bruijn index)
App(TermId, TermId)
Application (f x)
Lam(Binder, TermId)
Lambda abstraction (λ x : τ, body)
Pi(Binder, TermId)
Dependent function type (Π x : τ, body) / forall
Let(Binder, TermId, TermId)
Let binding (let x : τ := v in body)
MVar(MetaVarId)
Metavariable (hole to be filled during elaboration)
Lit(Literal)
Literal values (for optimization)
Trait Implementations§
impl Eq for TermKind
impl StructuralPartialEq for TermKind
Auto Trait Implementations§
impl Freeze for TermKind
impl RefUnwindSafe for TermKind
impl Send for TermKind
impl Sync for TermKind
impl Unpin for TermKind
impl UnwindSafe for TermKind
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