Last active
March 31, 2016 08:44
This file contains hidden or 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