mirror of
https://github.com/github/semantic.git
synced 2024-12-24 23:42:31 +03:00
Stub in an ArbitraryDiff type.
This commit is contained in:
parent
fa4e5011ac
commit
21b2d7fdfd
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user