Trait moniker::BoundTerm

source ·
pub trait BoundTerm<N: Clone + PartialEq> {
    fn term_eq(&self, other: &Self) -> bool;
    fn close_term(&mut self, state: ScopeState, on_free: &impl OnFreeFn<N>);
    fn open_term(&mut self, state: ScopeState, on_bound: &impl OnBoundFn<N>);
    fn visit_vars(&self, on_var: &mut impl FnMut(&Var<N>));
    fn visit_mut_vars(&mut self, on_var: &mut impl FnMut(&mut Var<N>));

    fn free_vars(&self) -> HashSet<FreeVar<N>>
    where
        N: Eq + Hash + Clone
, { ... } }
Expand description

Terms that may contain variables that can be bound by patterns

Required Methods

Alpha equivalence for terms

Close the term using the supplied binders

Open the term using the supplied binders

Visit each variable in the term, calling the on_var callback on each of them in turn

Visit each variable in the term, calling the on_var callback on each of them in turn

Provided Methods

Returns the set of free variables in this term

Implementations on Foreign Types

Implementors