Skip to content

[core] Add unsafeConnect{Aligned,Flipped}#5259

Open
seldridge wants to merge 1 commit intomainfrom
dev/seldridge/bidirectional-unsafe-domain-cast
Open

[core] Add unsafeConnect{Aligned,Flipped}#5259
seldridge wants to merge 1 commit intomainfrom
dev/seldridge/bidirectional-unsafe-domain-cast

Conversation

@seldridge
Copy link
Copy Markdown
Member

Add two utilities unsafeConnect{Aligned,Flipped} to the domain package
that help when a user needs to d an unsafe bidirectional crossing. This
comes up for almost any non-trivial bundle (e.g., any Decoupled).

This fills a hole in the current APIs where domain.unsafeCast produces a
node-like value that, if the only API provided, would force users to blow
out the bundle into its constituent fields.

Note: this would be better handled with tighter integration with
Connectable via operations which allow you to get views of the aligned
or flipped leaf fields.

AI-assisted-by: Claude Code (Claude Sonnet 4.6)

Release Notes

Add domain.unsafeConnect{Aligned,Flipped} to allow for a combined domain cast
and connect of aligned or flipped fields. This fills a hole in the existing
domain.unsafeCast API in that this produces a read-only "node-like" value
which makes doing bidirectional crossings tedious.

Add two utilities `unsafeConnect{Aligned,Flipped}` to the `domain` package
that help when a user needs to d an unsafe bidirectional crossing.  This
comes up for almost any non-trivial bundle (e.g., any `Decoupled`).

This fills a hole in the current APIs where `domain.unsafeCast` produces a
node-like value that, if the only API provided, would force users to blow
out the bundle into its constituent fields.

Note: this would be better handled with tighter integration with
`Connectable` via operations which allow you to get views of the aligned
or flipped leaf fields.

AI-assisted-by: Claude Code (Claude Sonnet 4.6)
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge added the Feature New feature, will be included in release notes label Apr 3, 2026
@seldridge seldridge marked this pull request as ready for review April 3, 2026 16:48
@seldridge seldridge requested a review from jackkoenig April 3, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature New feature, will be included in release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant