Skip to content

Commit e50e615

Browse files
authored
Merge pull request #262 from reflex-frp/dn-add-more-docs
Add deprecated to mapPartitionEithers
2 parents 53bfa66 + 218506f commit e50e615

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Data/Map/Misc.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,13 @@ diffMap olds news = flip Map.mapMaybe (align olds news) $ \case
4646
-- See also 'Reflex.Patch.Map' and 'Reflex.Patch.MapWithMove'.
4747
applyMap :: Ord k => Map k (Maybe v) -> Map k v -> Map k v
4848
applyMap patch old = insertions `Map.union` (old `Map.difference` deletions)
49-
where (deletions, insertions) = mapPartitionEithers $ maybeToEither <$> patch
49+
where (deletions, insertions) = Map.mapEither maybeToEither patch
5050
maybeToEither = \case
5151
Nothing -> Left ()
5252
Just r -> Right r
5353

5454
-- |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" #-}
5556
mapPartitionEithers :: Map k (Either a b) -> (Map k a, Map k b)
5657
mapPartitionEithers = Map.mapEither id
5758

0 commit comments

Comments
 (0)