-
Notifications
You must be signed in to change notification settings - Fork 448
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
Deprecation of Semigroup
and Monoid
#2935
Conversation
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/raise/Builders.kt
Outdated
Show resolved
Hide resolved
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.
Thank you so much @serras for taking on this work! 🙏 🙌
A couple of remarks, and suggestions. Mostly about two things:
-
I think we missed a bunch of
mapOrAccumulate
implementation where now new methods forValidated
have been introduced. SincemapOrAccumulate
is defined overRaise<E>.(A) -> B
it's compatible with bothValidated
andEither
after users refactor away fromValidated
. -
A couple of APIs I think we should deprecate all together with the removal of
Semigroup
rather than introduce new methods that were previously derived fromMonad + Semigroup/Monoid
orApplicative + Semigroup/Monoid
.
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Option.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Either.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Either.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Ior.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Iterable.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Pair.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Sequence.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Validated.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/map.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/predef.kt
Outdated
Show resolved
Hide resolved
…tion.kt Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
…tion.kt Co-authored-by: Simon Vergauwen <nomisRev@users.noreply.github.com>
There's one missing point for this PR, which is what should be done with the tests using |
Does it still make sense if we remove the That way you can still test |
@serras I updated the PR, I think my changes need a thorough reverse review from you 😅 |
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 great. Awesome work @serras 🙏 👏 🙌
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Iterable.kt
Outdated
Show resolved
Hide resolved
arrow-libs/core/arrow-core/src/commonMain/kotlin/arrow/core/Either.kt
Outdated
Show resolved
Hide resolved
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.
LGTM!
I've just left a thought, but it's just a thought related to replacements to depreacation methods. Feel free to use it or not 😄 .
…ine semantically changing
…w into deprecate-semigroup-monoid
the whole type is being deprecatedConst
Ior
Iterable
NonEmptyList
Option
Pair
Sequence
map
predef
the whole type is being deprecatedValidated
continuations/*`the whole thing is being deprecatedraise/RaiseAccumulate
raise/Builders
the whole file is being deprecatedfx/ParTraverseValidated