pub struct AlphaCtx { /* private fields */ }Expand description
Context for alpha equivalence checking
Implementations§
Source§impl AlphaCtx
impl AlphaCtx
Sourcepub fn bind<T>(&mut self, left: &Name<T>, right: &Name<T>) -> (usize, usize)
pub fn bind<T>(&mut self, left: &Name<T>, right: &Name<T>) -> (usize, usize)
Bind two names to a fresh identifier
Sourcepub fn unbind<T>(
&mut self,
left: &Name<T>,
right: &Name<T>,
old: (usize, usize),
)
pub fn unbind<T>( &mut self, left: &Name<T>, right: &Name<T>, old: (usize, usize), )
Unbind names (restore old mappings)
Sourcepub fn lookup_left<T>(&self, name: &Name<T>) -> usize
pub fn lookup_left<T>(&self, name: &Name<T>) -> usize
Look up a name in the left mapping
Sourcepub fn lookup_right<T>(&self, name: &Name<T>) -> usize
pub fn lookup_right<T>(&self, name: &Name<T>) -> usize
Look up a name in the right mapping
Trait Implementations§
Auto Trait Implementations§
impl Freeze for AlphaCtx
impl RefUnwindSafe for AlphaCtx
impl Send for AlphaCtx
impl Sync for AlphaCtx
impl Unpin for AlphaCtx
impl UnwindSafe for AlphaCtx
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