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

IO.onError is inconsistent with ApplicativeError #4058

Open
Jasper-M opened this issue Apr 18, 2024 · 1 comment
Open

IO.onError is inconsistent with ApplicativeError #4058

Jasper-M opened this issue Apr 18, 2024 · 1 comment

Comments

@Jasper-M
Copy link
Contributor

The onError that you get from ApplicativeError has this signature:

def onError[A](fa: F[A])(pf: PartialFunction[E, F[Unit]]): F[A]

While the "native" one in IO doesn't take a PartialFunction:

def onError(f: Throwable => IO[Unit]): IO[A]

That could lead to some surprises if you would rewrite a piece of code from tagless final to IO, or if you are just used to using the onError extension method in other code.

@armanbilge armanbilge added this to the v3.6.0 milestone Apr 18, 2024
@armanbilge
Copy link
Member

I think we can fix this one fairly source-compatibly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

2 participants