From f04805918bdec3486fe021344bbe12ceba13a6fb Mon Sep 17 00:00:00 2001 From: "Kai(luo) Wang" Date: Wed, 5 Sep 2018 10:33:07 -0400 Subject: [PATCH 1/3] add back the implicit method as explicit to maintain BC --- core/src/main/scala/cats/data/OptionT.scala | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/src/main/scala/cats/data/OptionT.scala b/core/src/main/scala/cats/data/OptionT.scala index 9cac0f5c2a..c65062b516 100644 --- a/core/src/main/scala/cats/data/OptionT.scala +++ b/core/src/main/scala/cats/data/OptionT.scala @@ -217,6 +217,10 @@ object OptionT extends OptionTInstances { } private[data] sealed abstract class OptionTInstances extends OptionTInstances0 { + //to maintain binary compatibility + def catsDataMonadForOptionT[F[_]](implicit F0: Monad[F]): Monad[OptionT[F, ?]] = + new OptionTMonad[F] { implicit val F = F0 } + implicit def catsDataTraverseForOptionT[F[_]](implicit F0: Traverse[F]): Traverse[OptionT[F, ?]] = new OptionTTraverse[F] with OptionTFunctor[F] { implicit val F = F0 } From 21c3c8262c09dd002b989e30ee364e2e5d6f5296 Mon Sep 17 00:00:00 2001 From: "Kai(luo) Wang" Date: Wed, 5 Sep 2018 11:15:21 -0400 Subject: [PATCH 2/3] Update build.sbt --- build.sbt | 1 - 1 file changed, 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4949babd99..41c6d9b0bb 100644 --- a/build.sbt +++ b/build.sbt @@ -266,7 +266,6 @@ def mimaSettings(moduleName: String) = { import com.typesafe.tools.mima.core.ProblemFilters._ //Only sealed abstract classes that provide implicit instances to companion objects are allowed here, since they don't affect usage outside of the file. Seq( - exclude[DirectMissingMethodProblem]("cats.data.OptionTInstances.catsDataMonadForOptionT"), exclude[DirectMissingMethodProblem]("cats.data.OptionTInstances2.catsDataTraverseForOptionT"), exclude[DirectMissingMethodProblem]("cats.data.KleisliInstances1.catsDataCommutativeArrowForKleisliId"), exclude[DirectMissingMethodProblem]("cats.data.OptionTInstances1.catsDataMonoidKForOptionT"), From 0a32f4470fc728eb6158d575595659233aed2c58 Mon Sep 17 00:00:00 2001 From: Luka Jacobowitz Date: Wed, 5 Sep 2018 18:20:41 +0200 Subject: [PATCH 3/3] Please scalastyle --- core/src/main/scala/cats/data/OptionT.scala | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/cats/data/OptionT.scala b/core/src/main/scala/cats/data/OptionT.scala index c65062b516..606bc5d252 100644 --- a/core/src/main/scala/cats/data/OptionT.scala +++ b/core/src/main/scala/cats/data/OptionT.scala @@ -217,10 +217,10 @@ object OptionT extends OptionTInstances { } private[data] sealed abstract class OptionTInstances extends OptionTInstances0 { - //to maintain binary compatibility - def catsDataMonadForOptionT[F[_]](implicit F0: Monad[F]): Monad[OptionT[F, ?]] = + // to maintain binary compatibility + def catsDataMonadForOptionT[F[_]](implicit F0: Monad[F]): Monad[OptionT[F, ?]] = new OptionTMonad[F] { implicit val F = F0 } - + implicit def catsDataTraverseForOptionT[F[_]](implicit F0: Traverse[F]): Traverse[OptionT[F, ?]] = new OptionTTraverse[F] with OptionTFunctor[F] { implicit val F = F0 }