Repository navigation
v2: carry the type-declaration modifier slot on NormalizedTree (M0 precursor) - #13033
Merged
Merged
Conversation
…nstructor) on NormalizedTree The slot was consumed by G0 and minted nothing, so no reader of a lowered declaration could tell `type X nominal_opaque = Y` from `type X = Y`. Precursor to M0 of the nominal-type plan (gunbc#13024): the census's Opaque class is unobservable without it. - v2.compiler.body_lowering_fold: closed vocabulary TypeDeclModifier and a positional reader of the slot off the parse (body_lower_type_decl_declared_modifiers); an unreadable slot refuses, located, never read as empty. - v2.compiler.normalize: type_declaration_modifier_capture, carried on NormalizedTree type_declaration_modifiers beside type_declaration_kinds; admit_normalized_tree takes it. - Control: v2.test.parse.type_decl_modifier_carrier (carries / does not / slot order / spelling as a name / real normalize route). Unknown spellings stay refused at parse by the existing probe. - gunbc.rung_drop g0_type_decl_modifier_parse_without_sealing_property narrowed, not retired: carrying enforces nothing, and its trigger is the construction wall. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…loor NonFoldResidueRosterDiverged) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…new-witness step budget (84854 > 72300 with an alias rhs) Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…nkeyed lexical refs in a hand-built fixture), first selected by this PR's call-site edit Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… minted occurrences (resolve keys lexical bindings by occurrence) Drops the floor_expected_red row added in 588c329 (which also broke that file's parse). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Ledger-Repair-Judged: docs/design-rung-drops.md Ledger-Rows-Repaired: docs/design-rung-drops.md g0_type_decl_modifier_parse_without_sealing_property Ledger-Rows-Repaired: docs/design-rung-drops.md edited_bin_witness_wet_rows_not_executed_by_ci Heal-Candidate-Run: 37090292139
gunbai-bot Bot
pushed a commit
that referenced
this pull request
Oct 3, 2026
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This was referenced Oct 3, 2026
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.
Precursor to M0 of the nominal-type plan (gunbc#13024,
docs/plans/nominal-type-declaration-plan.md). sharp-raven-357 ruled option (2): M0's census ridescensus-resolve, and that walk could not see whether a type declaration carriesnominal_opaquebecause G0 consumed the modifier slot and minted nothing. Without this change the census'sOpaqueclass would fall silently intoUnconstrainedNominal/TrueAlias.Change
v2.compiler.body_lowering_fold): a closedTypeDeclModifiervocabulary (NominalOpaqueModifier | SoleConstructorModifier). It is modeled as the slot plus a closed set, not a per-spelling flag, because plan §9 S1 puts constructor and view visibility in this same slot. The readerbody_lower_type_decl_declared_modifiersreads the slot positionally off the parse, the same waybody_lower_type_decl_eq_rhs_optionalreads the body. A slot it cannot read refuses withbody_lowering_reason_type_decl_modifier_unreadableat its location; it is never read as empty.v2.compiler.normalize):type_declaration_modifier_capturecarries the rows onNormalizedTreetype_declaration_modifiers, besidetype_declaration_kinds, following theDeclaredTypeKindprecedent.admit_normalized_treetakes the new argument. Hand-built roots passno_type_declaration_modifiers(), and roots rebuilt from a tree pass that tree's own rows.gunbc.instruments.type_declaration_use_census), which lands next (§3c declared frontier).Rung drop: narrowed, not retired
gunbc.rung_drop.g0_type_decl_modifier_parse_without_sealing_propertyis narrowed, not retired. This change mints the property, but its restoration trigger is the construction wall, which nothing on the native route enforces yet. A drop is retired by its trigger and by nothing else, so the population row now names the carried-but-unenforced state.Controls (
v2.test.parse.type_decl_modifier_carrier), all PASS locally on the seednominal_opaquealias carries its modifier, and asole_constructorrecord carries its own. Both were red against the first cut of the reader, which mis-read a present keyword atom as an empty slot.normalizeroute carries the row ontoNormalizedTree, so deleting the capture turns it red.parse_g0_tokens_remainat its location. That is covered by the existingtype_decl_modifier_g0_parse_probe(13/13 PASS).Regression spot-checks of edited call sites (local)
fold_encoding_test: all PASS.image_occurrence_projection_test: all PASS.body_let_annotation_test: 34 PASS, 2 FAIL. The same 2 (bla_refinement_*) fail on main at d8eebae, so they predate this change.Grammar: no production changed; only the comment above
dag_grammar_type_decl_modifiers_expr(stern-bear-500 informed).🤖 Generated with Claude Code