@@ -46,12 +46,13 @@ diffMap olds news = flip Map.mapMaybe (align olds news) $ \case
46-- See also 'Reflex.Patch.Map' and 'Reflex.Patch.MapWithMove'.
46-- See also 'Reflex.Patch.Map' and 'Reflex.Patch.MapWithMove'.
47applyMap :: Ord k => Map k (Maybe v) -> Map k v -> Map k v
47applyMap :: Ord k => Map k (Maybe v) -> Map k v -> Map k v
48applyMap patch old = insertions `Map.union` (old `Map.difference` deletions)
48applyMap patch old = insertions `Map.union` (old `Map.difference` deletions)
49− where (deletions, insertions) = mapPartitionEithers $ maybeToEither <$> patch
49+ where (deletions, insertions) = Map.mapEither id $ maybeToEither <$> patch
50 maybeToEither = \case
50 maybeToEither = \case
51 Nothing -> Left ()
51 Nothing -> Left ()
52 Just r -> Right r
52 Just r -> Right r
54-- |Split a @'Map' k (Either a b)@ into @Map k a@ and @Map k b@, equivalent to @'Map.mapEither' id@
54-- |Split a @'Map' k (Either a b)@ into @Map k a@ and @Map k b@, equivalent to @'Map.mapEither' id@
55+{-# DEPRECATED mapPartitionEithers "Use 'mapEither' instead" #-}
55mapPartitionEithers :: Map k (Either a b) -> (Map k a, Map k b)
56mapPartitionEithers :: Map k (Either a b) -> (Map k a, Map k b)
56mapPartitionEithers = Map.mapEither id
57mapPartitionEithers = Map.mapEither id