We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Nested[_, _, _] |@| Nested[_, _, _] should probably result in a nested cartesian builder, so that it is easier to handle Nested[_, Validated, _]
Nested[_, _, _] |@| Nested[_, _, _]
Nested[_, Validated, _]
The text was updated successfully, but these errors were encountered:
With -Ypartial-unification this works:
-Ypartial-unification
import cats.data.{Nested, Validated} import cats.implicits._ val a = Nested(1.validNel[String].some) val b = Nested(2.validNel[String].some) val c = Nested("boom1".invalidNel[Int].some) val d = Nested("boom2".invalidNel[Int].some) (a |@| b).map(_ + _) // Nested[Option,[+A]ValidatedNel[String,A],Int] = // Nested(Some(Valid(3))) (a |@| c).map(_ + _) // Nested[Option,[+A]ValidatedNel[String,A],Int] = // Nested(Some(Invalid(NonEmptyList(boom1)))) (c |@| d).map(_ + _) // Nested[Option,[+A]ValidatedNel[String,A],Int] = // Nested(Some(Invalid(NonEmptyList(boom1, boom2)))) (c, d).map2(_ + _) // mapN after PR #1487 // Nested[Option,[+A]ValidatedNel[String,A],Int] = // Nested(Some(Invalid(NonEmptyList(boom1, boom2))))
Note that the cartesian builder syntax will (probably) be replaced by enriched tuple methods.
Sorry, something went wrong.
No branches or pull requests
Nested[_, _, _] |@| Nested[_, _, _]
should probably result in a nested cartesian builder, so that it is easier to handleNested[_, Validated, _]
The text was updated successfully, but these errors were encountered: