[][src]Trait chalk_solve::ext::CanonicalExt

pub trait CanonicalExt<T: HasInterner, I: Interner> {
    fn map<OP, U>(self, interner: &I, op: OP) -> Canonical<U::Result>
    where
        OP: FnOnce(T::Result) -> U,
        T: Fold<I>,
        U: Fold<I>,
        U::Result: HasInterner<Interner = I>
; }

Required methods

fn map<OP, U>(self, interner: &I, op: OP) -> Canonical<U::Result> where
    OP: FnOnce(T::Result) -> U,
    T: Fold<I>,
    U: Fold<I>,
    U::Result: HasInterner<Interner = I>, 

Loading content...

Implementations on Foreign Types

impl<T, I> CanonicalExt<T, I> for Canonical<T> where
    T: HasInterner<Interner = I>,
    I: Interner
[src]

fn map<OP, U>(self, interner: &I, op: OP) -> Canonical<U::Result> where
    OP: FnOnce(T::Result) -> U,
    T: Fold<I>,
    U: Fold<I>,
    U::Result: HasInterner<Interner = I>, 
[src]

Maps the contents using op, but preserving the binders.

NB. op will be invoked with an instantiated version of the canonical value, where inference variables (from a fresh inference context) are used in place of the quantified free variables. The result should be in terms of those same inference variables and will be re-canonicalized.

Loading content...

Implementors

Loading content...