on develop help sign in
Fix mapEither usage
commit218506f036a9ad6937633df0856ba6cf17cd3460 authorDivam <dfordivam@gmail.com> dateThu 24 Jan 2019, 04:52 (8 years ago) parentb146245
1 file changed+1−1
src/Data/Map/Misc.hs+1−1
src/Data/Map/Misc.hs+1−1
@@ -46,7 +46,7 @@ diffMap olds news = flip Map.mapMaybe (align olds news) $ \case
4646-- See also 'Reflex.Patch.Map' and 'Reflex.Patch.MapWithMove'.
4747applyMap :: Ord k => Map k (Maybe v) -> Map k v -> Map k v
4848applyMap patch old = insertions `Map.union` (old `Map.difference` deletions)
49− where (deletions, insertions) = Map.mapEither id $ maybeToEither <$> patch
49+ where (deletions, insertions) = Map.mapEither maybeToEither patch
5050 maybeToEither = \case
5151 Nothing -> Left ()
5252 Just r -> Right r