Wrap `body` with `∀ T_0 T_1 ... T_{n-1}, body` using the supplied block-param binders (outermost-first). Mirrors compile-side `mk_forall(body, &block_param_decls)`. # de Bruijn convention Inside `body`, free `Var(i)` for `i < n_block_params` refers to block param at position `n_block_params - 1 - i` in the recursor-external context (because spec_params follow this pattern). After the wrap, `Var(n
(
&mut self,
body: KExpr<M>,
binders: &[(
M::MField<ix_common::env::Name>,
M::MField<ix_common::env::BinderInfo>,
KExpr<M>,
)],
)
| 989 | })(); |
| 990 | self.lctx.truncate(saved_lctx); |
| 991 | result |
| 992 | } |
| 993 | |
| 994 | /// Rewrite nested occurrences in synthetic aux member/ctor types to the |
| 995 | /// corresponding synthetic aux constants before running `sort_consts` |
| 996 | /// partition refinement. Compile-side `expand_nested_block` does this via |
| 997 | /// its queue pass over all expanded constructors; the kernel has already |
| 998 | /// discovered the flat aux set, so it can rewrite by matching each |
| 999 | /// occurrence against that set. |
| 1000 | fn replace_aux_refs_for_sort( |
| 1001 | &mut self, |
| 1002 | e: &KExpr<M>, |
| 1003 | aux: &[FlatBlockMember<M>], |
| 1004 | aux_ids: &[KId<M>], |
| 1005 | block_us: &[KUniv<M>], |
| 1006 | n_block_params: u64, |
| 1007 | local_depth: u64, |
| 1008 | ) -> Result<KExpr<M>, TcError<M>> { |
| 1009 | if let Some(replaced) = self.try_replace_aux_ref_for_sort( |
| 1010 | e, |
| 1011 | aux, |
| 1012 | aux_ids, |
| 1013 | block_us, |
| 1014 | n_block_params, |
| 1015 | local_depth, |
| 1016 | )? { |
| 1017 | return Ok(replaced); |
| 1018 | } |
| 1019 |
no test coverage detected