Decompose the type inferencer's :invoke arm
infer's :invoke case was ~120 lines of cond arms hand-coding eight call patterns, all destructured positionally with (nth r 0)/(nth r 1) on the [type node'] tuples infer returns. Split each pattern into a named helper (infer-pred-fold/-kw-lookup/-get-lookup/-reduce-hof/-seq-hof/-conj-into/-call) behind an infer-invoke dispatcher that keeps the cond guards verbatim, and add ty/nd accessors for the tuple so a silent transposition can't hide. The accessors are applied only to genuine infer results (the new helpers and infer-fn-seeded); the :map/:let/:loop arms interleave non-infer pairs (binding tuples, accumulator pairs) with infer results, so those keep nth. Pure restructuring — the guards, order, and bodies are unchanged; seed re-minted to the byte-fixpoint, gate green, 0 new corpus divergences.
This commit is contained in:
parent
a893e21111
commit
54c3c6dd2b
2 changed files with 379 additions and 316 deletions
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue