pub struct MetaCtx { /* private fields */ }Expand description
The metavariable context: fresh-name supply + the substitution being solved.
Implementations§
Source§impl MetaCtx
impl MetaCtx
pub fn new() -> Self
Sourcepub fn solution(&self, name: &str) -> Option<&Term>
pub fn solution(&self, name: &str) -> Option<&Term>
The solution recorded for metavariable name, if any.
Sourcepub fn solve(&mut self, name: &str, term: Term)
pub fn solve(&mut self, name: &str, term: Term)
Directly bind metavariable name := term, WITHOUT normalizing term. Used when
the term is already known well-typed and should be kept structured (e.g. a resolved
typeclass instance list_inst Nat (mk Nat Zero), which must not be δ-unfolded into
its body). The kernel re-checks the assembled term regardless.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MetaCtx
impl RefUnwindSafe for MetaCtx
impl Send for MetaCtx
impl Sync for MetaCtx
impl Unpin for MetaCtx
impl UnsafeUnpin for MetaCtx
impl UnwindSafe for MetaCtx
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