pub enum Term {
Var(String, Type),
Abs(Vec<(Term, Term)>, Type),
App(Box<Term>, Box<Term>, Type),
}
Variants§
Implementations§
source§impl Term
impl Term
pub fn to_string(&self) -> String
pub fn typ(&self) -> Type
pub fn is_concrete(&self) -> bool
pub fn infer(&self) -> Term
pub fn var(s: &str) -> Term
pub fn abs(ts: Vec<(Term, Term)>) -> Term
pub fn app(f: Term, x: Term) -> Term
pub fn asc(t: Term, tt: Type) -> Term
Trait Implementations§
source§impl PartialEq for Term
impl PartialEq for Term
impl Eq for Term
impl StructuralEq for Term
impl StructuralPartialEq for Term
Auto Trait Implementations§
impl RefUnwindSafe for Term
impl Send for Term
impl Sync for Term
impl Unpin for Term
impl UnwindSafe for Term
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