package magnolia
- Alphabetic
- Public
- Protected
Type Members
- trait DeriveDiff extends LowPri
- trait DeriveGen[A] extends AnyRef
A
DeriveGen[A]
can derive a generator ofA
values.A
DeriveGen[A]
can derive a generator ofA
values. Implicit instances of DeriveGen are automatically provided for standard types and algebraic data types made up of standard types. For example, here is how you can automatically derive generators for case classes and sealed traits:final case class Point(x: Double, y: Double) val genPoint: Gen[Any, Point] = DeriveGen[Point] sealed trait Color case object Red extends Color case object Green extends Color case object Blue extends Color val genColor: Gen[Any, Color] = DeriveGen[Color]
You can derive generators that include your own custom types by providing an implicit
DeriveGen
instance for your type using a generator and theinstance
method. - trait LowPri extends AnyRef
Value Members
- object DeriveDiff extends DeriveDiff
- object DeriveGen