Skip to content

Commit

Permalink
Remove unnecessary instance (#388)
Browse files Browse the repository at this point in the history
It was merged in cats-core.
  • Loading branch information
joroKr21 authored Sep 26, 2021
1 parent a9345b7 commit d8c8853
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions core/src/test/scala/cats/derived/commutativeSemigroup.scala
Original file line number Diff line number Diff line change
Expand Up @@ -66,23 +66,12 @@ class CommutativeSemigroupSuite extends KittensSuite {
}

object CommutativeSemigroupSuite {

// can be removed once kittens depends on a version of cats that includes https://github.com/typelevel/cats/pull/2834
implicit def commutativeSemigroupOption[A](implicit sa: CommutativeSemigroup[A]): CommutativeSemigroup[Option[A]] =
new CommutativeSemigroup[Option[A]] {
def combine(x: Option[A], y: Option[A]): Option[A] =
cats.instances.option.catsKernelStdMonoidForOption(sa).combine(x, y)
}

final case class Mul(value: Int)
object Mul {

implicit val eqv: Eq[Mul] =
Eq.fromUniversalEquals

implicit val arbitrary: Arbitrary[Mul] =
Arbitrary(Arbitrary.arbitrary[Int].map(apply))

implicit val commutativeSemigroup: CommutativeSemigroup[Mul] =
CommutativeSemigroup.instance((x, y) => Mul(x.value * y.value))
}
Expand Down

0 comments on commit d8c8853

Please sign in to comment.