@@ -18,7 +18,7 @@ import Control.Monad ((<=<))
1818import qualified Data.Either as Either
1919import Data.Functor.Identity (Identity (Identity , runIdentity ))
2020import Data.Monoid
21- import Data.Maybe hiding (catMaybes , mapMaybe )
21+ import Data.Maybe hiding (mapMaybe )
2222import qualified Data.Maybe as Maybe (mapMaybe )
2323import Data.Ord
2424import Data.Semigroup (Arg (.. ))
@@ -124,7 +124,6 @@ main = defaultMain $ testGroup "map-properties"
124124 , testCase " filterWithKey" test_filterWithKey
125125 , testCase " partition" test_partition
126126 , testCase " partitionWithKey" test_partitionWithKey
127- , testCase " catMaybes" test_catMaybes
128127 , testCase " mapMaybe" test_mapMaybe
129128 , testCase " mapMaybeWithKey" test_mapMaybeWithKey
130129 , testCase " mapEither" test_mapEither
@@ -297,7 +296,6 @@ main = defaultMain $ testGroup "map-properties"
297296 , testProperty " differenceWith" prop_differenceWith
298297 , testProperty " differenceWithKey" prop_differenceWithKey
299298 , testProperty " partitionWithKey" prop_partitionWithKey
300- , testProperty " catMaybes" prop_catMaybes
301299 , testProperty " mapMaybe" prop_mapMaybe
302300 , testProperty " mapMaybeWithKey" prop_mapMaybeWithKey
303301 , testProperty " traverseMaybeWithKey" prop_traverseMaybeWithKey
@@ -864,9 +862,6 @@ test_partitionWithKey = do
864862 partitionWithKey (\ k _ -> k < 7 ) (fromList [(5 ," a" ), (3 ," b" )]) @?= (fromList [(3 , " b" ), (5 , " a" )], empty)
865863 partitionWithKey (\ k _ -> k > 7 ) (fromList [(5 ," a" ), (3 ," b" )]) @?= (empty, fromList [(3 , " b" ), (5 , " a" )])
866864
867- test_catMaybes :: Assertion
868- test_catMaybes = catMaybes (fromList [(5 ,Just " a" ), (3 ,Nothing )]) @?= singleton 5 " a"
869-
870865test_mapMaybe :: Assertion
871866test_mapMaybe = mapMaybe f (fromList [(5 ," a" ), (3 ," b" )]) @?= singleton 5 " new a"
872867 where
@@ -1965,13 +1960,6 @@ prop_partitionWithKey f m =
19651960 where
19661961 (m1, m2) = partitionWithKey (applyFun2 f) m
19671962
1968- prop_catMaybes :: Map Int (Maybe A ) -> Property
1969- prop_catMaybes m =
1970- valid m' .&&.
1971- toList m' === Maybe. mapMaybe (\ (k,x) -> (,) k <$> x) (toList m)
1972- where
1973- m' = catMaybes m
1974-
19751963prop_mapMaybe :: Fun A (Maybe B ) -> Map Int A -> Property
19761964prop_mapMaybe f m =
19771965 valid m' .&&.
0 commit comments