From eba24b9ac1f7dc5e8c673ec7da35775d5e3e22ed Mon Sep 17 00:00:00 2001
From: Artem Pelenitsyn <a.pelenitsyn@gmail.com>
Date: Wed, 31 May 2023 10:21:36 -0400
Subject: [PATCH] Fix QuickCheck instance of PackageName to not produce 'all'
 (fix #8986)

Co-authored-by: Bryan Richter <b@chreekat.net>
---
 Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs b/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
index 03d0ed0461..01a5d1d904 100644
--- a/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
+++ b/Cabal-QuickCheck/src/Test/QuickCheck/Instances/Cabal.hs
@@ -74,7 +74,7 @@ instance Arbitrary PackageName where
     arbitrary = mkPackageName . intercalate "-" <$> shortListOf1 2 nameComponent
       where
         nameComponent = shortListOf1 5 (elements packageChars)
-                        `suchThat` (not . all isDigit)
+                        `suchThat` (liftA2 (&&) (not . all isDigit) (/= "all"))
         packageChars  = filter isAlphaNum ['\0'..'\127']
 
 instance Arbitrary PackageIdentifier where
-- 
GitLab