All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalaprops.scalazlaws.divide.scala Maven / Gradle / Ivy

package scalaprops
package scalazlaws

import scalaprops.Property.forAll
import scalaz._

object divide {
  def composition[F[_], A](implicit F: Divide[F], G: Gen[F[A]], E: Equal[F[A]]): Property =
    forAll(F.divideLaw.composition[A] _)

  def laws[F[_]: Divide](implicit
    G: Gen[F[Int]], E: Equal[F[Int]]
  ): Properties[ScalazLaw] =
    Properties.properties(ScalazLaw.divide)(
      ScalazLaw.divideComposition -> this.composition[F, Int]
    )

  def all[F[_]: Divide](implicit G: Gen[F[Int]], E: Equal[F[Int]]): Properties[ScalazLaw] =
    Properties.fromProps(ScalazLaw.divideAll, divide.laws[F], contravariant.all[F])
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy