-
Notifications
You must be signed in to change notification settings - Fork 96
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
Remove subsumption from Applicatives #569
Merged
Merged
Conversation
This file contains 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
gusty
force-pushed
the
gus/strict-applicatives
branch
3 times, most recently
from
November 22, 2023 09:36
1f29f2d
to
8412408
Compare
gusty
force-pushed
the
gus/strict-applicatives
branch
from
November 25, 2023 18:17
f69959b
to
ac46e9b
Compare
gusty
force-pushed
the
gus/strict-applicatives
branch
from
November 25, 2023 18:41
70a50f4
to
029ed98
Compare
gusty
force-pushed
the
gus/strict-applicatives
branch
from
November 25, 2023 19:37
e5a9c69
to
4f8ab5c
Compare
gusty
force-pushed
the
gus/strict-applicatives
branch
from
November 25, 2023 20:30
7a36bbb
to
9474025
Compare
cannorin
approved these changes
Nov 26, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
gusty
changed the title
Use strict types for applicatives (rebased)
Remove subsumption from Applicatives
Nov 26, 2023
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.
Same as #207 but rebased.
I gave it another try and looks like I found a way not to break anything, so no need to wait for v2.
This will allow Vector and Matrix to implement
IEnumerable
.Another reason to implement this is removing dependencies between
NonEmptySeq<'T>
(now that F#8 allows static member on interfaces) andFSharpPlus.Control
by creating its own static members #552Also to the original issues:
.. I will amend the former like this:
IEnumerable<_>
would default to the seq<_> instance. This might be arguably desired, but it will result in unexpected behavior: different IEnumerables can have different applicative instances, this is becoming more evident in Non sequential Applicatives #559 for example a ZipList can be an IEnumerable but its applicative instance won't have the same result as if you cast it to seq and then use the applicative for sequences, therefore it's better to require either an explicit applicative implementation, or an explicit cast toseq
. The other issue is the resulting type will be aseq<_>
instead of the original type, which would break many things.TODO