Skip to content

simplify fusion for arrays, sets, and maps#6949

Merged
mccanne merged 2 commits into
mainfrom
lean-fusion
May 14, 2026
Merged

simplify fusion for arrays, sets, and maps#6949
mccanne merged 2 commits into
mainfrom
lean-fusion

Conversation

@mccanne
Copy link
Copy Markdown
Collaborator

@mccanne mccanne commented May 14, 2026

This commit simplifies type fusion for container types (i.e., arrays, sets, and maps) by moving the fusion-type wrapper from the inner types to the container type. There is no loss of information about subtypes because a container type completely identifies the types of the consituent elements so there is no need for the elements to also carry their subtypes, i.e., they are passed down from the parent to the children elements during a donwcast. Note that retaining the fusion types on the elements instead of the parent container would not work because empty containers would have nowhere to store the empty container type.

Docs updates are forthcoming on a subsequent PR.

mccanne added 2 commits May 14, 2026 08:53
This commit simplifies type fusion for container types (i.e., arrays,
sets, and maps) by moving the fusion-type wrapper from the inner types
to the container type.  There is no loss of information about subtypes
because a container type completely identifies the types of the consituent
elements so there is no need for the elements to also carry their
subtypes, i.e., they are passed down from the parent to the children
elements during a donwcast.  Note that retaining the fusion types on the
elements instead of the parent container would *not* work because empty
containers would have nowhere to store the empty container type.

Docs updates are forthcoming on a subsequent PR.
Copy link
Copy Markdown
Member

@nwt nwt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice.

@mccanne mccanne merged commit 9d215b8 into main May 14, 2026
4 of 5 checks passed
@mccanne mccanne deleted the lean-fusion branch May 14, 2026 18:51
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.

2 participants