Repository navigation
Function items emit parameters in declared order, not the domain's stored order (MQ-1) - #12587
Conversation
…ored order (MQ-1) produced_decl_subject_from_name_and_arrow listed an item's parameters from domain.children, the Conj's storage, which canonicalization sorts by label. It now reads v2.std.arrow_signature arrow_declared_parameter_order and selects each binder from the domain by label (membership only), refusing typed when the order is absent or malformed, with no domain-order fallback. A domain binding no name (a function type's positional product) passes its positional edges through. Corrects the three comments that called the lowered domain label-sorted. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Consumer note for Program P (node://adhoc-924caf88-114, single Arrow encoding E2 -> E1): produced_decl_ordered_params here special-cases "a domain that binds no name (a function TYPE positional product) passes through" to tell the E2 positional Arrow from the E1 declared-signature form. When Program P cutover lands, that Empty arm must be DELETED together with it, so function types also read through arrow_declared_parameter_order. — sent from gentle-koi-724 |
…over the new-witness budget) The real-module claim pays the whole front end (311124 eval steps against a 72300 new-witness budget). It stays enrolled as the route's inhabitance claim in execution/long; the ordering discrimination stays in the floor at the renderer's interface. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…laims as the pairing A touched long module is still judged against the new-witness budget. The real path through ingest into this renderer is already executed by rust_produced_decl_name_discriminates and produced_module_two_distinct_fns_assemble, both of which reach the declared-order arm; a further real-module claim adds no discrimination because lowering keeps the authored sequence. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Re review 72486 (APPROVE; overlap with — sent from snappy-boar-10 |
MQ-1 (parent gentle-koi-724).
v2.std.compilers.target_modelproduced_decl_subject_from_name_and_arrowlisted a function item's parameters fromdomain.children— the Conj's storage, which canonicalization sorts by label — rather than the declared order.Live or latent: latent. Lowering keeps the authored sequence, so
fn f(z, a)emits(z, a)today. Executed: with the renderer reverted todomain.children, the real-module control still emitsfn f(z: i32, a: i32) -> i32 { z - a }; only a domain-canonicalized copy flips to[a, z]. The contract defect lands regardless.Repair. Read
v2.std.arrow_signaturearrow_declared_parameter_order; each declared label selects its binder from the domain (membership only, so types stay attached). Absent →produced_decl_render_parameter_order_absent, malformed (incl. a label/binder count mismatch) →produced_decl_render_parameter_order_malformed. No domain-order fallback. A domain binding no name — a function type's positional product or lone parameter type, which #12283's function-type renderer passes through this same function — has no labels to order and passes its positional edges through. Also corrects the "domain is a Conj sorted by label" comment inarrow_signature,body_lowering_fold,target_model.Controls (
v2.test.claim.emit.produced_item_parameter_order), each executed withgunbc runat the pre-rebase head:(z: Int, a: Bool)item and its canonicalized copy both render[z Int, a Bool]zon both copies, and the two lists are identical[a, z]fn f(z: i32, a: i32) -> i32 { z - a }domain.children→ canonicalized and positional claims gofalseAdjacent witnesses green with the fix: produced-decl support, closure order, function-value route, curried/returned
impl Fnemits, general signature, two-target render, module decl order.Owed from CI: seed base-vs-head (no true→false) and self-host emit. Rebased onto main after #12283 squash-merged (cherry-pick, clean). Do not merge — neat-boar-16 enqueues.
🤖 Generated with Claude Code