From cdbeba0b22b47d9e360a90baac66c361e2b5237e Mon Sep 17 00:00:00 2001 From: Luka Jacobowitz Date: Wed, 19 Sep 2018 15:00:20 +0200 Subject: [PATCH] Add Duration Instances to cats.instances.all and cats.implicits --- core/src/main/scala/cats/implicits.scala | 1 + core/src/main/scala/cats/instances/all.scala | 3 +++ core/src/main/scala/cats/instances/package.scala | 2 +- testkit/src/main/scala/cats/tests/CatsSuite.scala | 4 ++-- tests/src/test/scala/cats/tests/DurationSuite.scala | 1 - 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/scala/cats/implicits.scala b/core/src/main/scala/cats/implicits.scala index d89f1f1d46..0f4ab296f6 100644 --- a/core/src/main/scala/cats/implicits.scala +++ b/core/src/main/scala/cats/implicits.scala @@ -8,3 +8,4 @@ object implicits with instances.AllInstances with instances.AllInstancesBinCompat0 with instances.AllInstancesBinCompat1 + with instances.AllInstancesBinCompat2 diff --git a/core/src/main/scala/cats/instances/all.scala b/core/src/main/scala/cats/instances/all.scala index 95fa9bc6c8..0a34003172 100644 --- a/core/src/main/scala/cats/instances/all.scala +++ b/core/src/main/scala/cats/instances/all.scala @@ -44,3 +44,6 @@ trait AllInstancesBinCompat1 with StreamInstancesBinCompat0 with MapInstancesBinCompat0 with SortedMapInstancesBinCompat0 + +trait AllInstancesBinCompat2 + extends DurationInstances diff --git a/core/src/main/scala/cats/instances/package.scala b/core/src/main/scala/cats/instances/package.scala index 6aaefa4373..0d8ffb2480 100644 --- a/core/src/main/scala/cats/instances/package.scala +++ b/core/src/main/scala/cats/instances/package.scala @@ -1,7 +1,7 @@ package cats package object instances { - object all extends AllInstances with AllInstancesBinCompat0 with AllInstancesBinCompat1 + object all extends AllInstances with AllInstancesBinCompat0 with AllInstancesBinCompat1 with AllInstancesBinCompat2 object bigInt extends BigIntInstances object bigDecimal extends BigDecimalInstances object bitSet extends BitSetInstances diff --git a/testkit/src/main/scala/cats/tests/CatsSuite.scala b/testkit/src/main/scala/cats/tests/CatsSuite.scala index fac621f4dd..8f51d20d1b 100644 --- a/testkit/src/main/scala/cats/tests/CatsSuite.scala +++ b/testkit/src/main/scala/cats/tests/CatsSuite.scala @@ -2,7 +2,7 @@ package cats package tests import catalysts.Platform -import cats.instances.{AllInstances, AllInstancesBinCompat0, AllInstancesBinCompat1} +import cats.instances.{AllInstances, AllInstancesBinCompat0, AllInstancesBinCompat1, AllInstancesBinCompat2} import cats.syntax.{AllSyntax, AllSyntaxBinCompat0, AllSyntaxBinCompat1, AllSyntaxBinCompat2, EqOps} import org.scalactic.anyvals.{PosInt, PosZDouble, PosZInt} import org.scalatest.{FunSuite, FunSuiteLike, Matchers} @@ -33,7 +33,7 @@ trait CatsSuite extends FunSuite with GeneratorDrivenPropertyChecks with Discipline with TestSettings - with AllInstances with AllInstancesBinCompat0 with AllInstancesBinCompat1 + with AllInstances with AllInstancesBinCompat0 with AllInstancesBinCompat1 with AllInstancesBinCompat2 with AllSyntax with AllSyntaxBinCompat0 with AllSyntaxBinCompat1 with AllSyntaxBinCompat2 with StrictCatsEquality { self: FunSuiteLike => diff --git a/tests/src/test/scala/cats/tests/DurationSuite.scala b/tests/src/test/scala/cats/tests/DurationSuite.scala index 26456a6190..693093d26d 100644 --- a/tests/src/test/scala/cats/tests/DurationSuite.scala +++ b/tests/src/test/scala/cats/tests/DurationSuite.scala @@ -1,7 +1,6 @@ package cats package tests -import cats.instances.duration._ import cats.laws.discipline.SerializableTests import scala.concurrent.duration.{Duration, DurationInt}