From a1facfac7ae68dfd494e336fd12fc925407c6d56 Mon Sep 17 00:00:00 2001 From: Divam Date: Sun, 3 Nov 2024 15:19:17 +0900 Subject: [PATCH] Arbitrary instances for MapIgnoreUnknownKeys --- test/ghcup-test/GHCup/ArbitraryTypes.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/ghcup-test/GHCup/ArbitraryTypes.hs b/test/ghcup-test/GHCup/ArbitraryTypes.hs index 4bd1f0d4..916add68 100644 --- a/test/ghcup-test/GHCup/ArbitraryTypes.hs +++ b/test/ghcup-test/GHCup/ArbitraryTypes.hs @@ -196,6 +196,11 @@ instance {-# OVERLAPS #-} Arbitrary v => Arbitrary (M.Map (Maybe Version) v) whe instance {-# OVERLAPS #-} Arbitrary v => Arbitrary (M.Map Platform v) where arbitrary = resize 8 $ M.fromList <$> arbitrary +instance {-# OVERLAPS #-} Arbitrary v => Arbitrary (MapIgnoreUnknownKeys Platform v) where + arbitrary = resize 8 $ MapIgnoreUnknownKeys . M.fromList <$> arbitrary + +instance {-# OVERLAPS #-} Arbitrary v => Arbitrary (MapIgnoreUnknownKeys Architecture v) where + arbitrary = resize 8 $ MapIgnoreUnknownKeys . M.fromList <$> arbitrary + instance {-# OVERLAPS #-} Arbitrary v => Arbitrary (M.Map (Maybe Versioning) v) where arbitrary = resize 8 $ M.fromList <$> arbitrary -