Skip to content

Instantly share code, notes, and snippets.

@dabd
Last active Mar 31, 2016
Embed
What would you like to do?
import shapeless.tag.@@
import org.scalacheck.Prop.forAll
import org.scalacheck.Shapeless._
trait Baz
case class Foo(s: String @@ Baz)
case class Bar(f: Foo)
implicit def arbTagged[A : Arbitrary, B]: Arbitrary[A @@ B] = Arbitrary(arbitrary[A].map(a => tag[B](a)))
property("myprop") = forAll { b: Bar =>
true
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment