Trait

hedgehog

MonadGenOps

Related Doc: package hedgehog

Permalink

trait MonadGenOps[M[_]] extends AnyRef

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. MonadGenOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def discard[A](implicit G: MonadGen[M]): M[A]

    Permalink

    Discards the whole generator.

  7. def ensure[A](gen: M[A], p: (A) ⇒ Boolean)(implicit F: Monad[M], G: MonadGen[M]): M[A]

    Permalink

    Discards the generator if the generated value does not satisfy the predicate.

  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def filter[A](gen: M[A])(p: (A) ⇒ Boolean)(implicit F: Monad[M], G: MonadGen[M]): M[A]

    Permalink

    Generates a value that satisfies a predicate.

    Generates a value that satisfies a predicate.

    We keep some state to avoid looping forever. If we trigger these limits then the whole generator is discarded.

  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. def fromSome[A](gen: M[Option[A]])(implicit F: Monad[M], G: MonadGen[M]): M[A]

    Permalink

    Runs a Option generator until it produces a Some.

    Runs a Option generator until it produces a Some.

    This is implemented using filter and has the same caveats.

  13. def generate[A](f: (Size, Seed) ⇒ (Seed, A))(implicit G: MonadGen[M]): M[A]

    Permalink

    Construct a generator that depends on the size parameter.

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  16. def integral[A](range: Range[A], fromLong: (Long) ⇒ A)(implicit arg0: Integral[A], F: MonadGen[M]): M[A]

    Permalink

    Generates a random integral number in the given [inclusive,inclusive] range.

    Generates a random integral number in the given [inclusive,inclusive] range.

    When the generator tries to shrink, it will shrink towards the Range.origin of the specified Range.

    For example, the following generator will produce a number between 1970 and 2100, but will shrink towards 2000:

    Gen.integral(Range.constantFrom(2000, 1970, 2100))

    Some sample outputs from this generator might look like:

    === Outcome ===
    1973
    === Shrinks ===
    2000
    1987
    1980
    1976
    1974
    
    === Outcome ===
    2061
    === Shrinks ===
    2000
    2031
    2046
    2054
    2058
    2060
  17. def integral_[A](range: Range[A], fromLong: (Long) ⇒ A)(implicit G: MonadGen[M], I: Integral[A]): M[A]

    Permalink

    Generates a random integral number in the [inclusive,inclusive] range.

    Generates a random integral number in the [inclusive,inclusive] range.

    This generator does not shrink.

  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. def list[A](gen: M[A], range: Range[Int])(implicit F: Monad[M], G: MonadGen[M]): M[List[A]]

    Permalink

    Generates a list using a 'Range' to determine the length.

  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def sized[A](f: (Size) ⇒ M[A])(implicit F: Monad[M], G: MonadGen[M]): M[A]

    Permalink

    Construct a generator that depends on the size parameter.

  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped