Skip to content

Instantly share code, notes, and snippets.

@dabd
Last active March 31, 2016 08:44
Show Gist options
  • Save dabd/fbf5336b51f4c5d3bcd1404a76498a88 to your computer and use it in GitHub Desktop.
Save dabd/fbf5336b51f4c5d3bcd1404a76498a88 to your computer and use it in GitHub Desktop.
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