Permalink
Browse files

add Arbitrary[Endomorphic[F, A]] in ScalazArbitrary

  • Loading branch information...
1 parent 49d0fbe commit cf3e091e4df8a2e35a3517984dbfc6f021df283d @xuwei-k xuwei-k committed Nov 19, 2016
Showing with 3 additions and 0 deletions.
  1. +3 −0 scalacheck-binding/src/main/scala/scalaz/scalacheck/ScalazArbitrary.scala
@@ -217,6 +217,9 @@ object ScalazArbitrary extends ScalazArbitraryPlatform {
implicit def endoArb[A](implicit A: Arbitrary[A => A]): Arbitrary[Endo[A]] =
Functor[Arbitrary].map(A)(Endo.endo)
+ implicit def endomorphicArbitrary[F[_, _], A](implicit F: Arbitrary[F[A, A]]): Arbitrary[Endomorphic[F, A]] =
+ Functor[Arbitrary].map(F)(Endomorphic[F, A](_))
+
implicit def EphemeralStreamArbitrary[A : Arbitrary] =
Functor[Arbitrary].map(arb[Stream[A]])(EphemeralStream.fromStream[A](_))

0 comments on commit cf3e091

Please sign in to comment.