1
1
mirror of https://github.com/github/semantic.git synced 2024-12-26 00:12:29 +03:00

Remove the arbitrary instance for ArbitrarySyntax.

This commit is contained in:
Rob Rix 2015-12-11 11:00:26 -05:00
parent dbbada55da
commit 40eafd315d

View File

@ -25,13 +25,6 @@ unTerm arbitraryTerm = unfold unpack arbitraryTerm
newtype ArbitrarySyntax a f = ArbitrarySyntax { unSyntax :: Syntax a f } newtype ArbitrarySyntax a f = ArbitrarySyntax { unSyntax :: Syntax a f }
deriving (Show, Eq) deriving (Show, Eq)
instance (Arbitrary a, Arbitrary f) => Arbitrary (ArbitrarySyntax a f) where
arbitrary = oneof [
ArbitrarySyntax . Leaf <$> arbitrary,
ArbitrarySyntax . Indexed <$> arbitrary,
ArbitrarySyntax . Syntax.Fixed <$> arbitrary,
ArbitrarySyntax . Keyed . Map.fromList <$> arbitrary ]
instance (Arbitrary a, Arbitrary annotation) => Arbitrary (ArbitraryTerm a annotation) where instance (Arbitrary a, Arbitrary annotation) => Arbitrary (ArbitraryTerm a annotation) where
arbitrary = arbitraryBounded 4 arbitrary = arbitraryBounded 4