Skip to content

Commit

Permalink
-> reflexivity (typelevel#2672)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattkohl authored and kailuowang committed Feb 12, 2019
1 parent 9cc7a74 commit 663f654
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kernel-laws/src/main/scala/cats/kernel/laws/EqLaws.scala
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ trait EqLaws[A] {

implicit def E: Eq[A]

def reflexitivityEq(x: A): IsEq[A] =
def reflexivityEq(x: A): IsEq[A] =
x <-> x

def symmetryEq(x: A, y: A): IsEq[Boolean] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import cats.kernel.instances.option._
trait PartialOrderLaws[A] extends EqLaws[A] {
implicit override def E: PartialOrder[A]

def reflexitivityLt(x: A): IsEq[Boolean] =
def reflexivityLt(x: A): IsEq[Boolean] =
E.lteqv(x, x) <-> true

def reflexitivityGt(x: A): IsEq[Boolean] =
def reflexivityGt(x: A): IsEq[Boolean] =
E.gteqv(x, x) <-> true

def antisymmetry(x: A, y: A): IsEq[Boolean] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ trait EqTests[A] extends Laws {
new DefaultRuleSet(
"eq",
None,
"reflexitivity" -> forAll(laws.reflexitivityEq _),
"reflexivity" -> forAll(laws.reflexivityEq _),
"symmetry" -> forAll(laws.symmetryEq _),
"antisymmetry" -> forAll(laws.antiSymmetryEq _),
"transitivity" -> forAll(laws.transitivityEq _)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ trait PartialOrderTests[A] extends EqTests[A] {
"partialOrder",
Some(eqv),
"transitivity" -> forAll(laws.transitivity _),
"reflexitivity lt" -> forAll(laws.reflexitivityLt _),
"reflexitivity gt" -> forAll(laws.reflexitivityGt _),
"reflexivity lt" -> forAll(laws.reflexivityLt _),
"reflexivity gt" -> forAll(laws.reflexivityGt _),
"antisymmetry" -> forAll(laws.antisymmetry _),
"gt" -> forAll(laws.gt _),
"gteqv" -> forAll(laws.gteqv _),
Expand Down

0 comments on commit 663f654

Please sign in to comment.