From 2b1e33f922a089fd31f42f4e71590868b073bf97 Mon Sep 17 00:00:00 2001 From: "typelevel-steward[bot]" <106827141+typelevel-steward[bot]@users.noreply.github.com> Date: Mon, 11 Sep 2023 12:16:15 +0000 Subject: [PATCH 1/2] Update scala-library to 2.13.12 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 1f26a1c0..87484661 100644 --- a/build.sbt +++ b/build.sbt @@ -9,7 +9,7 @@ ThisBuild / developers := List( tlGitHubDev("edmundnoble", "Edmund Noble") ) -val Scala213 = "2.13.11" +val Scala213 = "2.13.12" ThisBuild / crossScalaVersions := Seq("3.3.1", "2.12.18", Scala213) ThisBuild / tlVersionIntroduced := Map("3" -> "1.2.1") From 23b6f739fc4baba1d1e4e761c2b47a72a1228f53 Mon Sep 17 00:00:00 2001 From: Arman Bilge Date: Mon, 11 Sep 2023 15:14:56 +0000 Subject: [PATCH 2/2] Add explicit types --- core/src/main/scala/cats/mtl/Ask.scala | 2 +- core/src/main/scala/cats/mtl/Local.scala | 2 +- core/src/main/scala/cats/mtl/MonadPartialOrder.scala | 2 +- core/src/main/scala/cats/mtl/Tell.scala | 2 +- tests/shared/src/test/scala/cats/mtl/tests/BaseSuite.scala | 4 ++-- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/core/src/main/scala/cats/mtl/Ask.scala b/core/src/main/scala/cats/mtl/Ask.scala index 8c7928ed..dda125c2 100644 --- a/core/src/main/scala/cats/mtl/Ask.scala +++ b/core/src/main/scala/cats/mtl/Ask.scala @@ -57,7 +57,7 @@ private[mtl] trait AskForMonadPartialOrder[F[_], G[_], E] extends Ask[G, E] { val lift: MonadPartialOrder[F, G] val F: Ask[F, E] - override def applicative = lift.monadG + override def applicative: Applicative[G] = lift.monadG override def ask[E2 >: E] = lift(F.ask) } diff --git a/core/src/main/scala/cats/mtl/Local.scala b/core/src/main/scala/cats/mtl/Local.scala index 5b87bdaf..912cce74 100644 --- a/core/src/main/scala/cats/mtl/Local.scala +++ b/core/src/main/scala/cats/mtl/Local.scala @@ -74,7 +74,7 @@ private[mtl] trait LocalInstances extends LowPriorityLocalInstances { new Local[Kleisli[F, E, *], E] { def local[A](fa: Kleisli[F, E, A])(f: E => E) = fa.local(f) val applicative = Applicative[Kleisli[F, E, *]] - def ask[E2 >: E] = Kleisli.ask[F, E2] + def ask[E2 >: E]: Kleisli[F, E2, E2] = Kleisli.ask[F, E2] } implicit def localForFunction[E]: Local[E => *, E] = diff --git a/core/src/main/scala/cats/mtl/MonadPartialOrder.scala b/core/src/main/scala/cats/mtl/MonadPartialOrder.scala index 7ae8b180..ac84e242 100644 --- a/core/src/main/scala/cats/mtl/MonadPartialOrder.scala +++ b/core/src/main/scala/cats/mtl/MonadPartialOrder.scala @@ -53,7 +53,7 @@ private[mtl] trait MonadPartialOrderInstances { implicit F: Monad[F]): MonadPartialOrder[F, EitherT[F, E, *]] = new MonadPartialOrder[F, EitherT[F, E, *]] { val monadF = F - val monadG = EitherT.catsDataMonadErrorForEitherT[F, E] + val monadG: Monad[EitherT[F, E, *]] = EitherT.catsDataMonadErrorForEitherT[F, E] def apply[A](fa: F[A]) = EitherT.liftF(fa) } diff --git a/core/src/main/scala/cats/mtl/Tell.scala b/core/src/main/scala/cats/mtl/Tell.scala index 3cfe4c14..15bc934d 100644 --- a/core/src/main/scala/cats/mtl/Tell.scala +++ b/core/src/main/scala/cats/mtl/Tell.scala @@ -53,7 +53,7 @@ private[mtl] trait TellMonadPartialOrder[F[_], G[_], L] extends Tell[G, L] { val lift: MonadPartialOrder[F, G] val F: Tell[F, L] - override def functor = lift.monadG + override def functor: Functor[G] = lift.monadG override def tell(l: L) = lift(F.tell(l)) } diff --git a/tests/shared/src/test/scala/cats/mtl/tests/BaseSuite.scala b/tests/shared/src/test/scala/cats/mtl/tests/BaseSuite.scala index 2ca9b0da..f037c541 100644 --- a/tests/shared/src/test/scala/cats/mtl/tests/BaseSuite.scala +++ b/tests/shared/src/test/scala/cats/mtl/tests/BaseSuite.scala @@ -126,7 +126,7 @@ abstract class BaseSuite extends FunSuite with EqSyntax with DisciplineSuite { .arbitrary .map(e => new (EitherC[E]#l ~> EitherC[E]#l) { - def apply[A](unused: E Either A) = Left(e) + def apply[A](unused: E Either A): Either[E, A] = Left(e) }) } yield res) } @@ -135,7 +135,7 @@ abstract class BaseSuite extends FunSuite with EqSyntax with DisciplineSuite { Arbitrary { Arbitrary.arbBool.arbitrary.map { no => if (no) new (Option ~> Option) { - def apply[A](o: Option[A]) = None + def apply[A](o: Option[A]): Option[A] = None } else FunctionK.id[Option] }