Last active
March 31, 2016 08:44
-
-
Save dabd/fbf5336b51f4c5d3bcd1404a76498a88 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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