( kenv: &mut KEnv<M>, lookups: &IxonIngressLookups, addr: &Address, )
| 3192 | // mismatch` on every mutual-block recursor (we saw this on |
| 3193 | // `Lean.Xml.Content.rec`, `Lean.Compiler.LCNF.Code.rec`, every |
| 3194 | // `Grind.Arith.*.*Cnstr*.rec`, etc.). |
| 3195 | // |
| 3196 | // Declaration order is *not* the canonical structural order that |
| 3197 | // `sort_consts` produces during compilation — that second order |
| 3198 | // only shows up in the compiled `kctx.kenv`, not here. Iterating |
| 3199 | // `lean_env` directly to push each constant's `self_kid` gave |
| 3200 | // random (FxHashMap iteration) order; we now seed each block with |
| 3201 | // its `all` list the first time any member is observed, then |
| 3202 | // append ctors and recursors in a second pass. Ctors/recursors |
| 3203 | // land at the tail — the block's inductive-prefix carries the |
| 3204 | // declaration order that `discover_block_inductives` consumes. |
| 3205 | // |
| 3206 | // `ixon_ingress` builds an analogous list for `kctx.kenv`, but |
| 3207 | // there the ordering comes from `sort_consts`' equivalence-class |
| 3208 | // output (structural, not declarational). The two paths diverge on |
| 3209 | // purpose: `orig_kenv` carries Lean's source-order recursor |
| 3210 | // expectations, `kctx.kenv` carries the canonical-compile recursor |
| 3211 | // expectations. |
| 3212 | // |
| 3213 | // For singleton inductives, the block is keyed at `self_kid`; for |
| 3214 | // multi-member mutuals, at the representative (first name in `all`). |
| 3215 | let block_rep = |name: &Name, ci: &LeanCI| -> KId<Meta> { |
| 3216 | let all = lean_constant_all(ci); |
| 3217 | let rep = |
| 3218 | all.and_then(|a| a.first()).cloned().unwrap_or_else(|| name.clone()); |
no test coverage detected