From be5b7f4d343580cb8d23b69177052d5780e8eb21 Mon Sep 17 00:00:00 2001 From: Filippo Mariotti Date: Fri, 8 Nov 2019 16:33:53 +0000 Subject: [PATCH] Minor clean up --- .../main/scala/cats/instances/parallel.scala | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/core/src/main/scala/cats/instances/parallel.scala b/core/src/main/scala/cats/instances/parallel.scala index 1e8860fafa..9b27a747e3 100644 --- a/core/src/main/scala/cats/instances/parallel.scala +++ b/core/src/main/scala/cats/instances/parallel.scala @@ -3,32 +3,10 @@ package instances import cats.data._ import cats.kernel.Semigroup -import cats.syntax.either._ -import cats.{~>, Applicative, Monad, Parallel} private[instances] trait ParallelInstances1 { @deprecated("Use EitherT.catsDataParallelForEitherTWithSequentialEffect", "2.0.0") def catsParallelForEitherTNestedValidated[M[_]: Monad, E: Semigroup] : Parallel.Aux[EitherT[M, E, *], Nested[M, Validated[E, *], *]] = - new Parallel[EitherT[M, E, *]] { - type F[x] = Nested[M, Validated[E, *], x] - - implicit val appValidated: Applicative[Validated[E, *]] = Validated.catsDataApplicativeErrorForValidated - implicit val monadEither: Monad[Either[E, *]] = cats.instances.either.catsStdInstancesForEither - - def applicative: Applicative[Nested[M, Validated[E, *], *]] = - cats.data.Nested.catsDataApplicativeForNested[M, Validated[E, *]] - - def monad: Monad[EitherT[M, E, *]] = cats.data.EitherT.catsDataMonadErrorForEitherT - - def sequential: Nested[M, Validated[E, *], *] ~> EitherT[M, E, *] = - λ[Nested[M, Validated[E, *], *] ~> EitherT[M, E, *]] { nested => - EitherT(Monad[M].map(nested.value)(_.toEither)) - } - - def parallel: EitherT[M, E, *] ~> Nested[M, Validated[E, *], *] = - λ[EitherT[M, E, *] ~> Nested[M, Validated[E, *], *]] { eitherT => - Nested(Monad[M].map(eitherT.value)(_.toValidated)) - } - } + EitherT.catsDataParallelForEitherTWithSequentialEffect }