From 21b2d7fdfdb30d766aaf5c5053e9f49222047097 Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 11 Dec 2015 16:03:04 -0500 Subject: [PATCH] Stub in an ArbitraryDiff type. --- test/Spec.hs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/Spec.hs b/test/Spec.hs index 07b606703..822808bf8 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -42,6 +42,9 @@ instance (Eq a, Eq annotation, Arbitrary a, Arbitrary annotation) => Arbitrary ( Fixed f -> Fixed <$> (List.subsequences f >>= recursivelyShrink) Keyed k -> Keyed . Map.fromList <$> (List.subsequences (Map.toList k) >>= recursivelyShrink)) +newtype ArbitraryDiff a annotation = ArbitraryDiff (ArbitraryTerm a annotation, ArbitraryTerm a annotation) + deriving (Show, Eq) + instance (Eq a, Eq annotation, Categorizable annotation, Arbitrary a, Arbitrary annotation) => Arbitrary (Diff a annotation) where arbitrary = interpret comparable <$> (unTerm <$> arbitrary) <*> (unTerm <$> arbitrary)