Give the Seq model named array and length fields#161
Open
coord-e wants to merge 1 commit into
Open
Conversation
This was referenced Jul 1, 2026
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84a3441e3b
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Replace the positional `Seq<T>(Array<Int, T>, Int)` tuple struct with a
named-field struct `Seq { array, length }`, and refer to the fields by
name throughout the extern specs and tests instead of `.0`/`.1`.
Struct literals are now supported in specification formulas: an
`ExprKind::Struct` is lowered to a tuple with fields placed at their
declaration position, mirroring how struct field access already resolves
named fields to positions.
Named field access does not auto-deref (the old positional `.0`/`.1`
access only worked through references incidentally, via unboxing), so
dereferences through `&`/`&mut` receivers are now written explicitly in
the annotations, e.g. `(*slice).length`.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi
84a3441 to
8b876de
Compare
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.
Summary
This is PR 1 of 4 in a restructuring of #153 into reviewable steps.
Replace the positional
Seq<T>(Array<Int, T>, Int)tuple struct with a named-field structSeq { array, length }, and refer to the fields by name (.array/.length) throughout the extern specs and tests instead of.0/.1.Details
ExprKind::Structis lowered to a tuple with fields placed at their declaration position, mirroring how struct field access already resolves named fields to positions..0/.1access only worked through references incidentally (via unboxing), so dereferences through&/&mutreceivers are now written explicitly in the annotations, e.g.(*slice).length.Validation
cargo build,cargo fmt --all -- --check,cargo clippy -- -D warningscargo test— all Spacer-backed UI tests and the reconstruction unit tests pass. (The PCSat-backed tests were not run in this environment as they require the CoAR Docker image.)Stack
concat_int_arraytakes sequence tuplessplit_first/split_last(_mut)🤖 Generated with Claude Code
https://claude.ai/code/session_01GzapTuen2mKHkkN3B7d8qi