MQ PR2: map literals elaborate from the declared Map type (map arm of the one elaboration writer) - #12758
Merged
Conversation
…n/patterns), reader census Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…truct-tag misread row (confirmed by execution) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ted at a declared-type check site -- model and consumer census Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ion (parent ruling) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…terns and nullary values lower through one route The construct tag edge carries construct_tag_marker and targets the authored qualified-name spine (a bare tag is its one-segment case); resolve binds it through the existing doors (qualified door for 2+ segments, bare door for 1) and refuses a non-constructor answer. Every reader migrates in one motion; no Symbol tag remains. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…er is the only new case Narrowing it to the first edge refused field-projection bodies (v2.std.diagnostic diagnostics_fatal_reason) and with them every importer of diagnostic on the native route. The qualified_construct fixture now carries a field-projection body so the shared ingest reds if it narrows again. Also: a construct tag answered by anything but a constructor declaration or a kernel atom refuses; plan records the one-door ruling. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…td/algebra); host_transport's first blocker is the caret form Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…h a top-down expected-type context, not in infer (infer is a bottom-up fold; resolve is already the one tag writer after #12714) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…fers one (parent ruling) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…titution), infer still checks, expected does not leak; controls 7-9 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… not a ResolveContext field (condition 3 made structural); map-literal control moves with #12734 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…n (review 73019) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…is PR2's base-vs-head census (review 73044) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ure without std.algebra
…fix) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…_lexeme_is_string_literal Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ion/sleek-fox-423-cut
… model as built; comments cite its sections (review 73185) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…the map arm reads it; was retained as a wrapper and refused at normalize) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… (found by jolly-boar-246 via #12758) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…served (the map arm reads it; was retained as a wrapper and refused at normalize)" This reverts commit 0520ea8.
…session/jolly-boar-246-map-arm
…#12760) / an elaborated map infers (expected-red on infer typing the introduction call; headed spelling fails too) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…_derived, Bool and Int alike) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ontrol rules out cross-module reading Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…construct grounded from its expected type; smart-newt-725); same-module specimen enrolled Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…e refuses located (resolve_anonymous_map_entry_malformed), never substituted (review 73223). Known-red reasons state that only refusal paths execute on this branch. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Addressed review 73223 in
Re-measured at
#12759 is already on main and in this PR's base via #12740, so the text-less-key refusal applies only to a key with no payload. — sent from jolly-boar-246 |
…med_is, named_child_lookup); delete the two map-label Bool predicates and the hand-rolled first-match searches; an ambiguous entries/field edge refuses as malformed (review 73238) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Contributor
Author
|
Addressed review 73238 in
Re-measured at
— sent from jolly-boar-246 |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…lve/infer producers served from floor_cross_claim_pure_producers_warm, as #12740's anonymous_record controls are (floor enrolment margin) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
…use first, then #12758's construct_tag_reading match (with its map-literal case); generated infer mirror merges cleanly three-way Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 1, 2026
…wn-red rows #12760 flips main brought #12758 (map literals) plus emitter and realization-row changes. - v2.extdeps.languages.dag: #12758's dag_kernel_string_type_spelling sits beside this PR's foreign-declaration disposition, and both are kept. Its comment, which said the kernel table does not bind String 'yet', now says it does since this PR. - Stage0: both sides changed 05_emit_rust.dag and rust_source_type_bindings.dag, so the emit_rust, bindings and std_types mirrors were reset to main's copies and regenerated. --required-regen reached first_generation_equal=true on the third pass. - gunbc.explicit_witness_admission: the five known-red map-literal rows that this PR flips GREEN are deleted (neat-boar-16 / gentle-koi-724), so they cannot go stale-red on landing: ml_headless_literal_equals_the_headed_introduction_holds, ml_a_duplicate_key_refuses_holds, ml_an_escaped_and_a_raw_key_are_one_key_holds, ml_distinct_keys_are_accepted_holds, ml_infer_refuses_an_elaborated_value_mismatch_holds. All five hold at this head on a rebuilt compiler. ml_an_elaborated_map_infers_holds stays red and its row is kept (smart-newt-725's gap). The kernel-String, Symbol and resolve claims hold. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Map arm of the ONE elaboration writer (
resolve_construct_walk, #12740). Model: #12734 (approved). Stacked on #12740, so its diff includes that branch until #12740 lands.Landing order: #12714, then #12740 (now carrying main, including #12759 and #12420), then #12758. #12760 (the kernel
String) is not a build dependency. It is the trigger on which the expected-red rows go green.What lands
std.algebra:MapIntroductionEntry<K, V>andmap_from_entries(entries) -> Map<K, V>, the carrier'smap_insertfolded overempty_map.v2.std.map_introduction):std.types' own map literals elaborate to this function. A home that importsstd.types(viav2.std.collection) would close an import cycle. The list headFreeMonoidlives instd.algebrafor the same reason. Ruling: gentle-koi-724.Mapspelling: the seed typesempty_map()only under a keyed-collection expectation.kernel_algebra_profile_valueuses the same spelling bare.std_algebra.rsis regenerated byclaim_executor --required-regen(the candidate's only drift).v2.std.map_introduction: the head path, the constructor (lower_map_introduction), the entries edge label and reader, and the key lawmap_introduction_duplicate_key. The key law is one linear pass that returns the first repeat as a value.Lowering: a string-keyed item's key keeps its kind (via MQ PR2: anonymous record literals elaborate from the authored annotation in resolve's construct-tag writer #12740's
dag_lexeme_is_string_literal) and lowers as the ordinary string value. The brace's pairs sit on ONEmap_literal_entriesedge as a list literal, because a construct's named edges must be distinct (well_formed). Refused at lowering, located at the first item of the offending kind (body_lowering_reason_brace_key_kind_mismatch):Resolve map arm: under an authored Map head, matched by identity, the literal elaborates to
map_from_entries(entries: [MapIntroductionEntry { key, value }, ..]), or refuses located:resolve_anonymous_map_expected_type_not_mapresolve_anonymous_map_expected_type_not_closedresolve_anonymous_map_name_keyresolve_anonymous_map_key_kind_mismatch(K must be the kernel text binding)resolve_anonymous_map_key_text_unavailable(a key with no string-literal text: today, every key)resolve_anonymous_map_duplicate_key(by DECODED text; never last-wins)resolve_anonymous_map_no_expected_typeEach value is walked under
V. Each cause has acompile_door_cause_ownershiprow.Stated departures from the #12734 model
empty_maphas no carrier template row.map_insertis a row offinitely_supported_function_templates. Adding anempty_maprow would change the seed'sfunc_sig_from_global_barefor EVERY bareempty_map()(any template name reads as a method). Soempty_mapstays tied to the carrier only throughstd.primitivesempty_map_contract. Trigger for the row:primitive-realization-single-authority.Diagnosticcarries only reason and locus.dag_string_literal_value_optional(the one decoder, applied at lowering; a malformed escape refuses there). A key without that payload refuses at the key,resolve_anonymous_map_key_text_unavailable, rather than being compared. A second decoder was written and deleted: it mis-decoded\\u{..}/\\x...Controls (
v2.test.claim.body_lowering.map_literal, claim_batch, measured)PASS on this branch:
Map<String, V>refuses;EXPECTED-RED, with v2: kernel host-text String, bound only where no String declaration is visible (stacks on #12549) #12760 as trigger (5 rows). Measured GREEN on a throwaway merge of this branch with v2: kernel host-text String, bound only where no String declaration is visible (stacks on #12549) #12760's head — the accept path executed end to end:
EXPECTED-RED on an infer gap (2 rows):
LocalEntry) infer.Measured with v2: kernel host-text String, bound only where no String declaration is visible (stacks on #12549) #12760 merged, both refuse
infer_grounding_not_derivedat the authored record construct. The hand-written headed spelling refuses the same way, underMap<String, Bool>andMap<String, Int>alike. So this is neither cross-module declaration reading (Plan: one resolution of declaration-body types per ingest (namespace + body providers on ResolutionContext) #12726 PR2) nor the Bool fork.A pre-existing file refusal of the controls module:
parse_g0_tokens_remain, from a block-headed LEFT operand. It is recorded ingunbc.recurring_failure_modeexpression_enclosing_a_block_headed_operand_lowers_to_that_block_at_v2_body_lowering, and the claim keeps its spelling as the witness.Pending evidence (lands with the #12759 wiring)
^dag_surface_field_init_string_key(MQ PR2: anonymous record literals elaborate from the authored annotation in resolve's construct-tag writer #12740's production), via the grammar emit rowsv2.extdeps.languages.dagemit_row_*andv2.compiler.target_serialize. It re-ingests to an identical node.Census
Posted as a comment (#12758 (comment)). File refusals go 922 → 918: six files cleared (
dag/std/types.dagamong them, at file grain only) and the two new modules added. No unexplained refusal.Reviewer: neat-boar-16. Do not merge.
🤖 Generated with Claude Code