Look up a bound variable's type, lifted to the current depth.
(&mut self, idx: u64)
| 625 | /// later or in parallel). Returns the fvar id and the interned fvar |
| 626 | /// expression. |
| 627 | pub fn push_fvar_decl_anon(&mut self, ty: KExpr<M>) -> (FVarId, KExpr<M>) { |
| 628 | let name = M::meta_field(ix_common::env::Name::anon()); |
| 629 | let bi = M::meta_field(ix_common::env::BinderInfo::Default); |
| 630 | let fv_id = self.fresh_fvar_id(); |
| 631 | let fv = self.intern(KExpr::fvar(fv_id, name.clone())); |
| 632 | self.lctx.push(fv_id, LocalDecl::CDecl { name, bi, ty }); |
| 633 | (fv_id, fv) |
| 634 | } |
| 635 | |
| 636 | /// Look up a bound variable's type, lifted to the current depth. |
| 637 | pub fn lookup_var(&mut self, idx: u64) -> Result<KExpr<M>, TcError<M>> { |
| 638 | let n = self.ctx.len(); |
| 639 | let idx_us = u64_to_usize::<M>(idx)?; |