diff --git a/core/src/main/scala/cats/Applicative.scala b/core/src/main/scala/cats/Applicative.scala index 2e41c42f7e..2f22d56e6e 100644 --- a/core/src/main/scala/cats/Applicative.scala +++ b/core/src/main/scala/cats/Applicative.scala @@ -22,13 +22,6 @@ import simulacrum.typeclass */ def pure[A](x: A): F[A] - /** - * `pureEval` lifts any value into the Applicative Functor. - * - * This variant supports optional laziness. - */ - def pureEval[A](x: Eval[A]): F[A] = pure(x.value) - override def map[A, B](fa: F[A])(f: A => B): F[B] = ap(pure(f))(fa) diff --git a/core/src/main/scala/cats/Eval.scala b/core/src/main/scala/cats/Eval.scala index a3833fa0aa..82a3a1a267 100644 --- a/core/src/main/scala/cats/Eval.scala +++ b/core/src/main/scala/cats/Eval.scala @@ -299,7 +299,6 @@ private[cats] trait EvalInstances extends EvalInstances0 { new Bimonad[Eval] with MonadRec[Eval] { override def map[A, B](fa: Eval[A])(f: A => B): Eval[B] = fa.map(f) def pure[A](a: A): Eval[A] = Now(a) - override def pureEval[A](la: Eval[A]): Eval[A] = la def flatMap[A, B](fa: Eval[A])(f: A => Eval[B]): Eval[B] = fa.flatMap(f) def extract[A](la: Eval[A]): A = la.value def coflatMap[A, B](fa: Eval[A])(f: Eval[A] => B): Eval[B] = Later(f(fa)) diff --git a/core/src/main/scala/cats/instances/future.scala b/core/src/main/scala/cats/instances/future.scala index cd7bd196f4..ba2490ee01 100644 --- a/core/src/main/scala/cats/instances/future.scala +++ b/core/src/main/scala/cats/instances/future.scala @@ -12,11 +12,6 @@ trait FutureInstances extends FutureInstances1 { new FutureCoflatMap with MonadError[Future, Throwable]{ def pure[A](x: A): Future[A] = Future.successful(x) - override def pureEval[A](x: Eval[A]): Future[A] = x match { - case Now(x) => Future.successful(x) - case _ => Future(x.value) - } - def flatMap[A, B](fa: Future[A])(f: A => Future[B]): Future[B] = fa.flatMap(f) def handleErrorWith[A](fea: Future[A])(f: Throwable => Future[A]): Future[A] = fea.recoverWith { case t => f(t) } diff --git a/core/src/main/scala/cats/instances/try.scala b/core/src/main/scala/cats/instances/try.scala index 32ee335f35..e92dcdacd7 100644 --- a/core/src/main/scala/cats/instances/try.scala +++ b/core/src/main/scala/cats/instances/try.scala @@ -15,11 +15,6 @@ trait TryInstances extends TryInstances1 { new TryCoflatMap with MonadError[Try, Throwable] with Traverse[Try] with MonadRec[Try] { def pure[A](x: A): Try[A] = Success(x) - override def pureEval[A](x: Eval[A]): Try[A] = x match { - case Now(x) => Success(x) - case _ => Try(x.value) - } - override def product[A, B](ta: Try[A], tb: Try[B]): Try[(A, B)] = (ta, tb) match { case (Success(a), Success(b)) => Success((a, b)) case (f: Failure[_], _) => castFailure[(A, B)](f) diff --git a/core/src/main/scala/cats/syntax/applicative.scala b/core/src/main/scala/cats/syntax/applicative.scala index 60df3a33e5..16dc9c55e4 100644 --- a/core/src/main/scala/cats/syntax/applicative.scala +++ b/core/src/main/scala/cats/syntax/applicative.scala @@ -3,13 +3,8 @@ package syntax trait ApplicativeSyntax { implicit def catsSyntaxApplicativeId[A](a: A): ApplicativeIdOps[A] = new ApplicativeIdOps[A](a) - implicit def catsSyntaxApplicativeEval[A](a: Eval[A]): ApplicativeEvalOps[A] = new ApplicativeEvalOps[A](a) } final class ApplicativeIdOps[A](val a: A) extends AnyVal { def pure[F[_]](implicit F: Applicative[F]): F[A] = F.pure(a) } - -final class ApplicativeEvalOps[A](val a: Eval[A]) extends AnyVal { - def pureEval[F[_]](implicit F: Applicative[F]): F[A] = F.pureEval(a) -} diff --git a/tests/src/test/scala/cats/tests/SyntaxTests.scala b/tests/src/test/scala/cats/tests/SyntaxTests.scala index 1456c72735..5ebb01562e 100644 --- a/tests/src/test/scala/cats/tests/SyntaxTests.scala +++ b/tests/src/test/scala/cats/tests/SyntaxTests.scala @@ -231,9 +231,6 @@ class SyntaxTests extends AllInstances with AllSyntax { def testApplicative[F[_]: Applicative, A]: Unit = { val a = mock[A] val fa = a.pure[F] - - val la = mock[Eval[A]] - val lfa = la.pureEval[F] } def testApplicativeError[F[_, _], E, A](implicit F: ApplicativeError[F[E, ?], E]): Unit = {