Skip to content

Commit

Permalink
add Equal[Ap[F, A]]
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Jul 24, 2017
1 parent 71b533c commit 654449d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/main/scala/scalaz/Ap.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ sealed abstract class ApInstances extends ApInstances0 {
val F = F0
val A = A0
}

implicit def ApEqual[F[_], A](implicit E: Equal[F[A]]): Equal[Ap[F, A]] =
E.contramap(_.f)
}

private sealed trait ApSemigroup[F[_], A] extends Semigroup[Ap[F, A]] {
Expand Down

0 comments on commit 654449d

Please sign in to comment.