@@ -717,6 +717,17 @@ instance Arbitrary FieldName where
717 shrink = genericShrink
717 shrink = genericShrink
720+#if MIN_VERSION_base(4,10,0)
721+-- Test.QuickCheck.Modifiers
723+qcNonEmptyToNonEmpty :: NonEmptyList a -> NonEmpty a
724+qcNonEmptyToNonEmpty (NonEmpty (a : xs)) = (a :| xs)
725+qcNonEmptyToNonEmpty (NonEmpty []) = error "NonEmpty was empty!"
727+instance Arbitrary a => Arbitrary (NonEmpty a) where
728+ arbitrary = qcNonEmptyToNonEmpty <$> arbitrary
720instance Arbitrary RegexpFlags where
731instance Arbitrary RegexpFlags where
721 arbitrary = oneof [ pure AllRegexpFlags
732 arbitrary = oneof [ pure AllRegexpFlags
722 , pure NoRegexpFlags
733 , pure NoRegexpFlags