Skip to content

refactor(dfns): derive tagged on keywords, records and unions - #390

Merged
wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:derive-composite-tagged
Oct 12, 2026
Merged

wpbonelli merged 1 commit into
MODFLOW-ORG:developfrom
wpbonelli:derive-composite-tagged

Conversation

@wpbonelli

@wpbonelli wpbonelli commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

Reinterpret tagged to mean "begins with a keyword" on every field. Scalars/arrays still declare it, signaling whether their name precedes their value. A keyword is always tagged. Composite types derive it, as a list already did. A list is tagged if its item is, a record is tagged if its first field is, and a union if every arm is, which is a tagged union in the type-theory sense.

`tagged` now means "begins with a keyword" on every field. A scalar or
array still declares it: whether its own name precedes its value. Other
types derive it, as a list already did. A keyword is always tagged, a
record is tagged if its first field is, and a union if every arm is,
which is a tagged union in the type-theory sense.

Records and unions used to default to `tagged = true` whatever their
contents, and nothing read the flag on them. 153 records and LAK's
`laksetting` (whose arms lead with a lake or outlet number) said tagged
but don't begin with a keyword. The derived values match what the
renderer and the list and block rules already did, so no behavior
changes. The flag is no longer serialized on these types. Files that
declare it still load, and a value that contradicts the type is an error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@wpbonelli wpbonelli added this to the 1.10.0 milestone Oct 12, 2026
@wpbonelli
wpbonelli marked this pull request as ready for review October 12, 2026 16:30
@wpbonelli
wpbonelli merged commit 7df4ae9 into MODFLOW-ORG:develop Oct 12, 2026
16 checks passed
@wpbonelli
wpbonelli deleted the derive-composite-tagged branch October 12, 2026 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant