scalaprops.scalazlaws.profunctor.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._
object profunctor {
def laws[F[_, _]](implicit F: Profunctor[F], A1: Gen[F[Int, Int]], A2: Equal[F[Int, Int]]): Properties[ScalazLaw] = {
implicit val a = F.covariantInstance[Int]
implicit val b = F.contravariantInstance[Int]
Properties.fromProps(
ScalazLaw.profunctor,
scalazlaws.functor.all[({type l[a] = F[Int, a]})#l],
scalazlaws.contravariant.all[({type l[a] = F[a, Int]})#l]
)
}
def all[F[_, _]](implicit F: Profunctor[F], A1: Gen[F[Int, Int]], A2: Equal[F[Int, Int]]): Properties[ScalazLaw] =
laws[F]
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy