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

Provide syntax to lift plain values into Eff? #17

Closed
benhutchison opened this issue Sep 22, 2016 · 1 comment
Closed

Provide syntax to lift plain values into Eff? #17

benhutchison opened this issue Sep 22, 2016 · 1 comment

Comments

@benhutchison
Copy link
Collaborator

I have this mixed-in thru a package object:

  implicit class Id[A](val a: A) {
    def pureEff[E]: Eff[E, A] = EffMonad[E].pure(a)
  }

I find it regularly useful, allows type A to be inferred. I chose pureEff rather than pure because of name collision.

@etorreborre
Copy link
Member

This is almost available with standard cats

1.pure[Eff[R, ?]]

I agree that 1.pureEff[R] would be syntactically more pleasing, I will add this.

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

No branches or pull requests

2 participants