Skip to content

Commit

Permalink
Fixes to laws.
Browse files Browse the repository at this point in the history
  • Loading branch information
denisrosset committed Oct 30, 2017
1 parent 1ec03ec commit c01b4d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion js/src/test/scala/cats/tests/FutureTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class FutureTests extends CatsSuite {
}

implicit val throwableEq: Eq[Throwable] =
Eq[String].on(_.toString)
Eq.by[Throwable, String](_.toString)

implicit val comonad: Comonad[Future] = futureComonad(timeout)

Expand Down
4 changes: 2 additions & 2 deletions kernel-laws/src/test/scala/cats/kernel/laws/LawTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ class Tests extends FunSuite with Discipline {

{
// needed for Cogen[Map[...]]
implicit val ohe: Ordering[HasEq[Int]] = Ordering[Int].on(_.a)
implicit val ohe: Ordering[HasEq[Int]] = Ordering.by[HasEq[Int], Int](_.a)
checkAll("Eq[Map[String, HasEq[Int]]]", EqTests[Map[String, HasEq[Int]]].eqv)
}

Expand Down Expand Up @@ -365,7 +365,7 @@ class Tests extends FunSuite with Discipline {

object HasHash {
implicit def hasHash[A: Hash]: Hash[HasHash[A]] =
Hash.by(_.a) // not Hash[A].on(_.a) because of diamond inheritance problems with Eq
Hash.by(_.a)
implicit def hasHashArbitrary[A: Arbitrary]: Arbitrary[HasHash[A]] =
Arbitrary(arbitrary[A].map(HasHash(_)))
implicit def hasCogen[A: Cogen]: Cogen[HasHash[A]] =
Expand Down

0 comments on commit c01b4d6

Please sign in to comment.