io.github.martinhh.derived

Members list

Type members

Classlikes

trait CogenSumInstanceSummoner[T, Elem]

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
sealed trait RecursionFallback[A]

Typeclass that allows to provide a "fallback" for recursive data structures.

Typeclass that allows to provide a "fallback" for recursive data structures.

If an instance of this is in scope, derived Arbitrary-instances for sum types will use the provided Gen once recursion depth reaches the configured scalacheck size.

Thus, the provided Gen should return a non-recursive subtype of the sum type (e.g. the "leaf" of a recursive tree).

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Attributes

Companion
trait
Supertypes
class Object
trait Matchable
class Any
Self type
object arbitrary

Public "API-entry-point" for derivation of Arbitrary-instances.

Public "API-entry-point" for derivation of Arbitrary-instances.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
arbitrary.type
object cogen

Public "API-entry-point" for derivation of Cogen-instances.

Public "API-entry-point" for derivation of Cogen-instances.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
cogen.type
object scalacheck

Public "API-entry-point" for derivation of scalacheck-typeclass-instances.

Public "API-entry-point" for derivation of scalacheck-typeclass-instances.

This does not provide derivation of Shrink-instances as that might not always be desired. You can opt in to derivation of Shrink-instances via shrink.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
scalacheck.type
object shrink

Public "API-entry-point" for derivation of Shrink-instances.

Public "API-entry-point" for derivation of Shrink-instances.

Note that derivation increases compile-time and that there is a (non-shrinking) fallback Shrink[T] for any type T provided by org.scalacheck.Shrink.shrinkAny. So: only use this if your need for shrinking justifies the extra compile-time overhead.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
shrink.type