Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce Tuple.ReverseOnto and use it in Tuple.reverse #19183

Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki self-assigned this Dec 4, 2023
@nicolasstucki nicolasstucki reopened this Dec 4, 2023
type ReverseImpl[Acc <: Tuple, X <: Tuple] <: Tuple = X match
case x *: xs => ReverseImpl[x *: Acc, xs]
case EmptyTuple => Acc
type ReverseOnto[From <: Tuple, To <: Tuple] <: Tuple = From match
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should To be covariant? As with Concat.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sjrd do you have an opinion or suggestion on this?

Copy link
Member

Choose a reason for hiding this comment

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

Mimic Concat would be my advice.

@nicolasstucki nicolasstucki force-pushed the step-towards-stabilizing-tuple-reverse branch from 41238f4 to 1dda4b3 Compare December 5, 2023 08:03
@nicolasstucki nicolasstucki marked this pull request as ready for review December 11, 2023 09:32
@nicolasstucki nicolasstucki assigned sjrd and unassigned nicolasstucki Dec 11, 2023
@nicolasstucki nicolasstucki force-pushed the step-towards-stabilizing-tuple-reverse branch from 1dda4b3 to 12e7c9e Compare December 12, 2023 08:52
@nicolasstucki nicolasstucki merged commit 8542342 into scala:main Dec 14, 2023
19 checks passed
@nicolasstucki nicolasstucki deleted the step-towards-stabilizing-tuple-reverse branch December 14, 2023 09:51
nicolasstucki added a commit to dotty-staging/dotty that referenced this pull request Dec 14, 2023
These definition was updated in scala#19183. This does not leave much time to
test before the release of 3.4. As a precaution we must delay it to 3.5.
nicolasstucki added a commit that referenced this pull request Dec 14, 2023
These definition was updated in #19183. This does not leave much time to
test before the release of 3.4. As a precaution we must delay it to 3.5.
@Kordyjan Kordyjan added this to the 3.4.0 milestone Dec 20, 2023
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.

3 participants