Repository navigation
v2: anonymous '_' parameter slots lower to minted, unwritable per-slot binders; retire #12287's interim refusal - #12298
Conversation
…nders; retire the interim repeated-'_' refusal Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
srv1 census from neat-boar-16 at 3ba02db, gen-one |
…plicate import; correct the recogniser's reader list Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Addressed review 71324 in 2e003a9:
Re-ran locally: all four Admission, local per-file run (
— sent from deep-heron-191 |
…s budget (72941/72300) and implied by apb_two_anonymous_slots_are_accepted_as_distinct_binders Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…12298, #12184, ...) - self-host instruments take main's versions (#12275 links only emitted bytes); #12208's std_algebra.rs bridge is deleted with the rest of the std-bridge shim directory it lived in. - body_lowering_fold keeps main's anonymous_binder + symbol_intern_lexeme imports with lower_list_introduction; native_frontier_ratchet (#12184) repointed to std.algebra. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Child of gentle-koi-724 (MQ pass). Shape approved by neat-boar-16 through gentle-koi-724, including D1 (see below). Retires the interim refusal from #12287.
Defect
v2's function domain is a Conj keyed by name.
fn f(_: A, _: B)therefore lowered to twoNamed { _ }edges, and a Conj can't carry two edges with the same label. v1 accepts this signature (v1.compiler.inferdirect_call_shape_wall_note). The gen-two census specimens arestd.key_relationglobal_key_scope_eqandgunbc.provider_readiness_claim_evidenceprovider_readiness_independence_claim. #12287 made them refuse at a located point underbody_lowering_reason_arrow_domain_anonymous_param_repeated, as a v2-behind-v1 frontier.Construction
v2.std.anonymous_binder(new) has one mint, one recogniser and one producer:anonymous_param_label(slot), produces<anonymous-parameter-N>. That spelling is not a dag identifier, so no body mention, named argument or field can write it. This follows thedeclaration_reference_marker(Resolver-minted declaration references carry an unauthorable marker; the reader never keys on the spine shape a literal also has #12220) andtype_params_marker(v2 type binders: a type declaration's <T> rides on its member under one unauthorable edge (trigger 1) #12240) precedent.is_anonymous_param_label.anonymous_binder_mint_domain. It is the only place a parameter's authored_spelling is read.fn(_: Int)a different type and a differentcontent_hashat every site, and any edit above a site would rename it (§4c). The slot's occurrence stays on the edge target, where it already was.body_lower_param_edgesmints once over the whole parameter list. Two functions read through it: the domain builder,body_lower_domain_from_param_list, and the ingest-side check list,body_lower_param_binding_symbols_from_param_list. They therefore still agree._in value position never finds a binder, because none can spell the minted label. It refuses under the new causeresolve_reason_anonymous_parameter_referenced, located at the mention's own authored occurrence and not at the slot label. Pattern wildcards are unchanged.anonymous_slot_pool_key), and each authored_parameter consumes one. So two_are conserved, and an extra one is still aDroppedReference. This retires the spelling match that fierce-gull-556 recorded onlambda_has_no_lowered_function_value_form.bound_spelling_from_map. A minted label is spelled as its authored source,_, and never as its marker text.body_lower_fn_signature_bindings_refusal, itsCorrectionNotModeledbranch, itscompile_door_cause_ownershipFatalGrain row, and its claim, which is now restated as an accepted control. The named-repeat arm stays.Census: every reader of domain labels, and what happens to it
body_lower_param_binding_optional/typed_param_edge/collect_param_edgesdomain_from_param_list,param_binding_symbols_from_param_listbody_lower_param_edges(the mint)arrow_domain_matches_ingest_param_bindings,arrow_domain_matches_frontend_symbol_indexbody_lower_fn_signature_bindings_refusal(#12287)add_arrow_domain_named_params,harvest_conj_named_bindingsresolve_atom(unbound arm)_resolve_pattern_binders/pattern_field_target_walk(wildcard patterns)symbol_index_fillArrow arminfer_conj_named_type_for_binding/arrow_domain_type_for_bindinginfer_formals_from_domaininhabitanceapplication_argument_does_not_inhabit_diagnosticeval_bind_param_edge_stepbound_spelling_from_map(reached byproduced_decl_param_segment_tokens, 06_translate arrow params, closure param tokens)_wiring_liveness,fn_index_depth_agreement,effect_reach,live_read_classificationFnArrowDecl.params, which the host marshals from v1, not v2 domain labelsno_dual_representationscan,copied_port_derivation,unused_parametersreference_conservationrebuilt_spelling_pool/pool_spelling_offold_loweringcarrier atoms, not a domain. #12210 (held on a cost review) builds lambda domains with its ownwildcard_primesscheme. Agreed with fierce-gull-556: whichever PR lands second routes that domain throughanonymous_binder_mint_domainand deletes the primes scheme. #12210's fresh type-parameter name derives from the minted label.Evidence (local
gunbcbuilt fromb51b8ff7f49in a private target dir, run over the merged head)v2.test.claim.anonymous_param_binderruns the production route (assemble_program_from_ingest). Its specimens are enrolled infloor_pure_producer_share. All four claims hold:apb_two_anonymous_slots_are_accepted_as_distinct_binders: the program is Accepted and well formed, with labels[<anonymous-parameter-1>, <anonymous-parameter-2>].apb_slot_label_is_the_position_in_its_own_binder_list: the same signature at two sites gives equal domaincontent_hashand equal labels, andfn h(x: Int, _: Int)gives[x, <anonymous-parameter-2>].apb_body_reference_to_an_anonymous_slot_refuses_located: the cause isresolve_reason_anonymous_parameter_referenced, and the locus is an atom spelled_with a non-synthetic occurrence.apb_recogniser_separates_minted_from_authored.nfbcp_repeated_anonymous_param_refuses_at_the_second_binding_holdsis deleted, not restated. A producer-interface restatement cost 72,941 eval steps against the 72,300 new-witness budget (floor run 36162778566), andapb_two_anonymous_slots_are_accepted_as_distinct_bindersimplies it. The rest ofparse_test_fn_decl_return_clauseis green.v2.test.claim.namespace_xl0.reference_conservationtwo_anonymous_parameter_slots_are_conserved_by_minted_identity_holdsholds.Mutations (each in its own tree copy):
slot: 1)two_anonymous_parameter_slots_are_conserved_by_minted_identity_holdsturns falsePre-existing, not this PR:
the_if_arm_call_argument_is_reported_dropped_holds,a_list_literal_call_argument_refuses_its_whole_module_holdsanda_repeated_spelling_with_one_copy_dropped_is_exactly_one_row_holdsare false on plainorigin/main69e0bb7566ewith the same interpreter, and equally false here.Not done / pending
_. The discriminating evidence is this PR's own claims and mutations above. Per-fileconserved_normalize_of_text, run locally at 2e003a9 and read by neat-boar-16:std.key_relation: still refuses with 11conservation_reason_dropped_reference. None of them is_, and there's nonot_well_formedor anonymous-param cause. The drops are field and argument labels (scope_of,key_eq, …), a separate conservation class that this PR does not fix.69e0bb7566,std.key_relationrefuses withbody_lowering_reason_arrow_domain_anonymous_param_repeated. At this PR (3ba02dbf54) it moves past that cause toconservation_reason_dropped_reference, the separate class.provider_readiness_claim_evidencerefuses withlist_literal_unloweredon both arms, so it can't tell.gunbc.provider_readiness_claim_evidence: stops atbody_lowering_reason_list_literal_unloweredbefore its domain is lowered, so its_behaviour is UNMEASURED._per signature gets two, and its own compiler refuses them.🤖 Generated with Claude Code