@@ -1318,6 +1318,7 @@ prop_merge miss1 miss2 match m1 m2 =
13181318 MapMissing f -> mapMissing (applyFun2 f)
13191319 MapMaybeMissing f -> mapMaybeMissing (applyFun2 f)
13201320 whenMatched spec = case spec of
1321+ DropMatched -> dropMatched
13211322 ZipWithMatched f -> zipWithMatched (applyFun3 f)
13221323 ZipWithMaybeMatched f -> zipWithMaybeMatched (applyFun3 f)
13231324
@@ -1361,6 +1362,7 @@ prop_mergeA miss1 miss2 match m1 m2 =
13611362 MapMissing f -> traverseMissing (\ k x -> ([k], applyFun2 f k x))
13621363 MapMaybeMissing f -> traverseMaybeMissing (\ k x -> ([k], applyFun2 f k x))
13631364 whenMatched spec = case spec of
1365+ DropMatched -> dropMatched
13641366 ZipWithMatched f -> zipWithAMatched (\ k x y -> ([k], applyFun3 f k x y))
13651367 ZipWithMaybeMatched f -> zipWithMaybeAMatched (\ k x y -> ([k], applyFun3 f k x y))
13661368
@@ -1383,14 +1385,16 @@ instance (Arbitrary a, CoArbitrary a, Function a, CoArbitrary k, Function k)
13831385 ]
13841386
13851387data WhenMatchedSpec k a
1386- = ZipWithMatched (Fun (k , a , a ) a )
1388+ = DropMatched
1389+ | ZipWithMatched (Fun (k , a , a ) a )
13871390 | ZipWithMaybeMatched (Fun (k , a , a ) (Maybe a ))
13881391 deriving Show
13891392
13901393instance (Arbitrary a , CoArbitrary a , Function a , CoArbitrary k , Function k )
13911394 => Arbitrary (WhenMatchedSpec k a ) where
13921395 arbitrary = oneof
1393- [ ZipWithMatched <$> arbitrary
1396+ [ pure DropMatched
1397+ , ZipWithMatched <$> arbitrary
13941398 , ZipWithMaybeMatched <$> arbitrary
13951399 ]
13961400
@@ -1429,6 +1433,7 @@ prop_mergeMapSet miss1 miss2 match m1 s2 =
14291433 GenerateMissingMapSet f -> MergeSet. generateMissingSet (applyFun f)
14301434 GenerateMaybeMissingMapSet f -> MergeSet. generateMaybeMissingSet (applyFun f)
14311435 whenMatched spec = case spec of
1436+ DropMatchedMapSet -> MergeSet. dropMatched
14321437 FilterMatchedMapSet f -> MergeSet. filterMatched (applyFun2 f)
14331438 MapMatchedMapSet f -> MergeSet. mapMatched (applyFun2 f)
14341439 MapMaybeMatchedMapSet f -> MergeSet. mapMaybeMatched (applyFun2 f)
@@ -1477,6 +1482,7 @@ prop_mergeAMapSet miss1 miss2 match m1 s2 =
14771482 GenerateMissingMapSet f -> MergeSet. generateAMissingSet (\ k -> ([k], applyFun f k))
14781483 GenerateMaybeMissingMapSet f -> MergeSet. generateMaybeAMissingSet (\ k -> ([k], applyFun f k))
14791484 whenMatched spec = case spec of
1485+ DropMatchedMapSet -> MergeSet. dropMatched
14801486 FilterMatchedMapSet f -> MergeSet. filterAMatched (\ k x -> ([k], applyFun2 f k x))
14811487 MapMatchedMapSet f -> MergeSet. traverseMatched (\ k x -> ([k], applyFun2 f k x))
14821488 MapMaybeMatchedMapSet f -> MergeSet. traverseMaybeMatched (\ k x -> ([k], applyFun2 f k x))
@@ -1500,19 +1506,22 @@ instance (Arbitrary a, CoArbitrary a, Function a, CoArbitrary k, Function k)
15001506 GenerateMaybeMissingMapSet f -> GenerateMaybeMissingMapSet <$> shrink f
15011507
15021508data WhenMatchedMapSetSpec k a
1503- = FilterMatchedMapSet (Fun (k , a ) Bool )
1509+ = DropMatchedMapSet
1510+ | FilterMatchedMapSet (Fun (k , a ) Bool )
15041511 | MapMatchedMapSet (Fun (k , a ) a )
15051512 | MapMaybeMatchedMapSet (Fun (k , a ) (Maybe a ))
15061513 deriving Show
15071514
15081515instance (Arbitrary a , CoArbitrary a , Function a , CoArbitrary k , Function k )
15091516 => Arbitrary (WhenMatchedMapSetSpec k a ) where
15101517 arbitrary = oneof
1511- [ FilterMatchedMapSet <$> arbitrary
1518+ [ pure DropMatchedMapSet
1519+ , FilterMatchedMapSet <$> arbitrary
15121520 , MapMatchedMapSet <$> arbitrary
15131521 , MapMaybeMatchedMapSet <$> arbitrary
15141522 ]
15151523 shrink spec = case spec of
1524+ DropMatchedMapSet -> []
15161525 FilterMatchedMapSet f -> FilterMatchedMapSet <$> shrink f
15171526 MapMatchedMapSet f -> MapMatchedMapSet <$> shrink f
15181527 MapMaybeMatchedMapSet f -> MapMaybeMatchedMapSet <$> shrink f
0 commit comments