pub trait CoreFold<L: Language>: Sized + CoreVisit<L> {
    // Required method
    fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self;

    // Provided methods
    fn shift_in(&self) -> Self { ... }
    fn replace_free_var(
        &self,
        v: impl Upcast<CoreVariable<L>>,
        p: impl Upcast<CoreParameter<L>>
    ) -> Self { ... }
}

Required Methods§

source

fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self

Replace uses of variables with values from the substitution.

Provided Methods§

source

fn shift_in(&self) -> Self

Produce a version of this term where any debruijn indices which appear free are incremented by one.

source

fn replace_free_var( &self, v: impl Upcast<CoreVariable<L>>, p: impl Upcast<CoreParameter<L>> ) -> Self

Replace all appearances of free variable v with p.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<L: Language> CoreFold<L> for u32

source§

fn substitute(&self, _substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language> CoreFold<L> for ()

source§

fn substitute(&self, _substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language> CoreFold<L> for usize

source§

fn substitute(&self, _substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language, A: CoreFold<L>, B: CoreFold<L>> CoreFold<L> for (A, B)

source§

fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language, A: CoreFold<L>, B: CoreFold<L>, C: CoreFold<L>> CoreFold<L> for (A, B, C)

source§

fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language, T: CoreFold<L>> CoreFold<L> for Option<T>

source§

fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language, T: CoreFold<L>> CoreFold<L> for Arc<T>

source§

fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self

source§

impl<L: Language, T: CoreFold<L>> CoreFold<L> for Vec<T>

source§

fn substitute(&self, substitution_fn: SubstitutionFn<'_, L>) -> Self

Implementors§

source§

impl<L: Language> CoreFold<L> for CoreSubstitution<L>

source§

impl<L: Language, T: CoreFold<L> + Ord> CoreFold<L> for Set<T>

source§

impl<L: Language, T: CoreFold<L>> CoreFold<L> for CoreBinder<L, T>