From a7c959db6c686afb9bfc5ec28ee249084ad4e00e Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Fri, 11 Dec 2015 10:34:43 -0500 Subject: [PATCH] Use the ordinary ArbitraryTerm constructor. --- test/Spec.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/test/Spec.hs b/test/Spec.hs index 6837f6d98..046e09877 100644 --- a/test/Spec.hs +++ b/test/Spec.hs @@ -35,13 +35,12 @@ instance (Arbitrary a, Arbitrary annotation) => Arbitrary (ArbitraryTerm a annot arbitrary = (\ annotation syntax -> ArbitraryTerm $ (annotation, unSyntax syntax)) <$> arbitrary <*> arbitrary arbitraryBounded :: (Arbitrary a, Arbitrary annotation) => Int -> Gen (ArbitraryTerm a annotation) -arbitraryBounded k = make <$> arbitrary <*> oneof [ +arbitraryBounded k = ArbitraryTerm <$> ((,) <$> arbitrary <*> oneof [ Leaf <$> arbitrary, Indexed <$> vectorOfAtMost k (arbitraryBounded $ k - 1), Syntax.Fixed <$> vectorOfAtMost k (arbitraryBounded $ k - 1), - Keyed . Map.fromList <$> arbitrary ] - where make annotation syntax = ArbitraryTerm $ (annotation, syntax) - vectorOfAtMost k gen = choose (0, k) >>= \n -> vectorOf n gen + Keyed . Map.fromList <$> arbitrary ]) + where vectorOfAtMost k gen = choose (0, k) >>= \n -> vectorOf n gen instance Arbitrary HTML where arbitrary = oneof [