eu.timepit.refined.scalacheck.any.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of refined-scalacheck_sjs0.6_2.12.0-M4 Show documentation
Show all versions of refined-scalacheck_sjs0.6_2.12.0-M4 Show documentation
Simple refinement types for Scala
The newest version!
package eu.timepit.refined
package scalacheck
import eu.timepit.refined.api.{ RefType, Validate }
import org.scalacheck.Arbitrary
object any {
implicit def arbitraryFromValidate[F[_, _], T, P](
implicit
rt: RefType[F],
v: Validate[T, P],
arb: Arbitrary[T]
): Arbitrary[F[T, P]] =
arbitraryRefType(arb.arbitrary.filter(v.isValid))
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy