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

deprecate signatures in computations and add Result for continuations #2669

Merged
merged 21 commits into from
Feb 28, 2022

Conversation

i-walker
Copy link
Member

@i-walker i-walker commented Feb 22, 2022

I am deprecating the computations module in a seperate PR
resolves #2669 by deprecation

@i-walker i-walker marked this pull request as ready for review February 22, 2022 14:16
public inline fun <A> eager(crossinline func: suspend RestrictedEvalEffect<A>.() -> A): Eval<A> =
Effect.restricted(eff = { RestrictedEvalEffect { it } }, f = func, just = Eval.Companion::now)

@Deprecated(deprecateInFavorOfEffect, ReplaceWith("effect(func)", "arrow.core.continuations.effect"))
Copy link
Member

Choose a reason for hiding this comment

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

👍, this deprecation will allows us to get rid of the confusing eval { } block 🥳

public inline fun <E, A> eager(crossinline c: suspend RestrictedEitherEffect<E, *>.() -> A): Either<E, A> =
Effect.restricted(eff = { RestrictedEitherEffect { it } }, f = c, just = { it.right() })

@Deprecated(deprecateInFavorOfEffect, ReplaceWith("either(c)", "arrow.core.continuations.either"))
Copy link
Member

Choose a reason for hiding this comment

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

🥳

@nomisRev nomisRev merged commit d381b57 into main Feb 28, 2022
@nomisRev nomisRev deleted the is-deprecation branch February 28, 2022 11:47
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