Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary instance #388

Merged
merged 1 commit into from
Sep 26, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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