From c9f13f2f413c3741599e99c6770535c91823f16c Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Mon, 21 Dec 2015 09:58:20 -0500 Subject: [PATCH] Define the arbitrary instances for Row and Line in terms of an Arbitrary type a. --- test/SplitSpec.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/SplitSpec.hs b/test/SplitSpec.hs index a7f29bbfc..f5c5810c3 100644 --- a/test/SplitSpec.hs +++ b/test/SplitSpec.hs @@ -12,7 +12,7 @@ import Control.Monad.Free hiding (unfold) import Patch import Syntax -instance Arbitrary (Row a) where +instance Arbitrary a => Arbitrary (Row a) where arbitrary = oneof [ Row <$> arbitrary <*> arbitrary ] @@ -22,7 +22,7 @@ instance Arbitrary HTML where Span <$> arbitrary <*> arbitrary, const Break <$> (arbitrary :: Gen ()) ] -instance Arbitrary (Line a) where +instance Arbitrary a => Arbitrary (Line a) where arbitrary = oneof [ Line <$> arbitrary <*> arbitrary, const EmptyLine <$> (arbitrary :: Gen ()) ]