Skip to content

Commit

Permalink
Add explicit types
Browse files Browse the repository at this point in the history
  • Loading branch information
armanbilge committed Sep 11, 2023
1 parent 2b1e33f commit 23b6f73
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/mtl/Ask.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/mtl/Local.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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] =
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/mtl/MonadPartialOrder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/cats/mtl/Tell.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}

Expand Down
4 changes: 2 additions & 2 deletions tests/shared/src/test/scala/cats/mtl/tests/BaseSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand All @@ -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]
}
Expand Down

0 comments on commit 23b6f73

Please sign in to comment.