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

Move Parallel instances into instance packages for the type constructors they characterize #3059

Closed
travisbrown opened this issue Sep 13, 2019 · 3 comments

Comments

@travisbrown
Copy link
Contributor

It seems pretty reasonable to expect the following to work:

import cats.instances.either._, cats.instances.string._, cats.syntax.parallel._

val e: Either[String, Int] = Left("e")

(e, e).parTupled

But it doesn't, because the Parallel instance for Either is in cats.instances.parallel, not cats.instances.either

After #3033, the only instances in the parallel instance package are for Either, Stream, and the NonEmptyParallel instances for List and Vector. I think all of these should be moved the instance packages for those types—cats.instances.either, cats.instances.stream.

This change would break source compatibility, but could be done in a binary-compatible way in 2.1 (by making all of the contents of cats.instance.parallel non-implicit and deprecated).

@barambani
Copy link
Contributor

If the work on this hasn't started yet I'd like to give a hand.

@travisbrown
Copy link
Contributor Author

@barambani I've not done anything on it, so that sounds good to me! I think it's a pretty reasonable change that could happen in 2.1, but we'll want to make sure there's consensus about that.

@barambani
Copy link
Contributor

Makes sense, I will wait for another while then, to give time to the discussion. Thanks 👍

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

3 participants