scalaprops.scalazlaws.bifunctor.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of scalaprops-scalazlaws_2.12.0-M4 Show documentation
Show all versions of scalaprops-scalazlaws_2.12.0-M4 Show documentation
property based testing library for Scala
The newest version!
package scalaprops
package scalazlaws
import scalaz._
import scalaz.std.tuple._
import scalaz.std.anyVal._
object bifunctor {
def laws[F[_, _]](implicit F: Bifunctor[F], E: Equal[F[Int, Int]], af: Gen[F[Int, Int]],
axy: Gen[Int => Int]): Properties[(ScalazLaw, *^*->*.T)] =
Properties.fromProps[(ScalazLaw, *^*->*.T)](
ScalazLaw.bifunctor -> *^*->*.Empty,
functor.all[({type l[a] = F[a, Int]})#l](F.leftFunctor[Int], implicitly, implicitly, implicitly).mapId((_, *^*->*.L)),
functor.all[({type l[a] = F[Int, a]})#l](F.rightFunctor[Int], implicitly, implicitly, implicitly).mapId((_, *^*->*.R))
)
def all[F[_, _]](implicit F: Bifunctor[F], E: Equal[F[Int, Int]], af: Gen[F[Int, Int]],
axy: Gen[Int => Int]) =
laws[F]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy