All Projects → scalaprops → scalaprops-magnolia

scalaprops / scalaprops-magnolia

Licence: MIT license
Generation of arbitrary case classes / ADTs instances with Scalaprops and Magnolia

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to scalaprops-magnolia

react-demos
Demonstrates how to content manage React apps with Magnolia CMS
Stars: ✭ 20 (+42.86%)
Mutual labels:  magnolia
parquet-extra
A collection of Apache Parquet add-on modules
Stars: ✭ 30 (+114.29%)
Mutual labels:  magnolia

scalaprops-magnolia

scaladoc

build.sbt

for jvm

libraryDependencies += "com.github.scalaprops" %% "scalaprops-magnolia" % "0.7.0"

for scala-js

libraryDependencies += "com.github.scalaprops" %%% "scalaprops-magnolia" % "0.7.0"

example

Import the content of scalaprop.ScalapropsMagnolia close to where you want scalaprops.Gen type classes to be automatically available for case classes / sealed hierarchies,

import scalaprops.{Gen, Cogen}
import scalaprops.ScalapropsMagnoliaGen._
import scalaprops.ScalapropsMagnoliaCogen._

sealed trait X 
case class Y(value: Boolean) extends X
case class Z(value: Int) extends X

Gen[X] // automatically available Gen[X] instance !
Cogen[X] // automatically available Cogen[X] instance !
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].