pub struct Converter { /* private fields */ }Expand description
Conversion checker with WHNF evaluation
Implementations§
Source§impl Converter
impl Converter
Sourcepub fn is_def_eq(
&mut self,
arena: &mut Arena,
env: &Environment,
ctx: &Context,
t1: TermId,
t2: TermId,
) -> Result<bool>
pub fn is_def_eq( &mut self, arena: &mut Arena, env: &Environment, ctx: &Context, t1: TermId, t2: TermId, ) -> Result<bool>
Check if two terms are definitionally equal
Sourcepub fn whnf(
&mut self,
arena: &mut Arena,
env: &Environment,
ctx: &Context,
term: TermId,
) -> Result<TermId>
pub fn whnf( &mut self, arena: &mut Arena, env: &Environment, ctx: &Context, term: TermId, ) -> Result<TermId>
Reduce a term to weak head normal form
Sourcepub fn substitute(
&mut self,
arena: &mut Arena,
term: TermId,
idx: u32,
replacement: TermId,
) -> Result<TermId>
pub fn substitute( &mut self, arena: &mut Arena, term: TermId, idx: u32, replacement: TermId, ) -> Result<TermId>
Substitute a term in another term subst(term, idx, replacement) replaces variable #idx with replacement
Sourcepub fn stats(&self) -> &ConversionStats
pub fn stats(&self) -> &ConversionStats
Get conversion statistics
Sourcepub fn clear_cache(&self)
pub fn clear_cache(&self)
Clear the WHNF cache
Sourcepub fn reset_fuel(&mut self)
pub fn reset_fuel(&mut self)
Reset fuel to default
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Converter
impl RefUnwindSafe for Converter
impl Send for Converter
impl Sync for Converter
impl Unpin for Converter
impl UnwindSafe for Converter
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