This repository has been archived by the owner on Feb 24, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 30
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
pakoito
reviewed
May 22, 2020
@@ -901,6 +900,21 @@ sealed class Either<out A, out B> : EitherOf<A, B> { | |||
} catch (t: Throwable) { | |||
fe(t.nonFatalOrThrow()).left() | |||
} | |||
|
|||
fun <E, A> fx2(c: suspend EagerBind<EitherPartialOf<E>>.() -> A): Either<E, A> { |
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.
fxEager
? fxNow
? fxJust
?
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.
I'd like to merge as soon as the build is green to continue working with other tickets, so I created an issue to discuss the naming in order not to block us :) Please feel free to continue the discussion there: #133
pakoito
approved these changes
May 22, 2020
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.
Explicit name!
aballano
approved these changes
May 25, 2020
…o generate all possible values
… order to generate all possible values" This reverts commit 578dbc7.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a small PR that implements the same runtime as #112 but in a strict fashion for strict monads that are found in
Arrow-Core
.This way they can be implemented without the trick currently used in the
FxMonad
implementation. This will unbind us from the JVM, and it will remove all penalties paid by the trick.This can be kept as a MPP implementation in the future as well for people not opting in for the compiler plugin.
Discussion:
suspend
andnon-suspend
function have a function name clash. This cannot be solved with@JvmName
since Kotlin cannot infer if it needs thesuspend
ornon-suspend
.