witherable 0.3.1 → 0.3.2
raw patch · 3 files changed
+14/−1 lines, 3 filesdep +monoidal-containers
Dependencies added: monoidal-containers
Files
- CHANGELOG.md +5/−0
- src/Data/Witherable.hs +7/−0
- witherable.cabal +2/−1
CHANGELOG.md view
@@ -1,3 +1,8 @@+0.3.2+----------++* Added `Filterable (MonoidalMap k)` and `Witherable (MonoidalMap k)`+ 0.3.1 ------- * Added `(<$?>)` as an alias for `mapMaybe`, with fixity matching `(<$>)`.
src/Data/Witherable.hs view
@@ -41,6 +41,7 @@ import qualified Data.Maybe as Maybe import qualified Data.IntMap.Lazy as IM import qualified Data.Map.Lazy as M+import qualified Data.Map.Monoidal as MM import qualified Data.Sequence as S import qualified Data.Vector as V import qualified Data.HashMap.Lazy as HM@@ -316,6 +317,12 @@ #if MIN_VERSION_containers(0,5,8) wither f = M.traverseMaybeWithKey (const f) #endif++instance Filterable (MM.MonoidalMap k) where+ mapMaybe = MM.mapMaybe+ filter = MM.filter++instance Witherable (MM.MonoidalMap k) instance (Eq k, Hashable k) => Filterable (HM.HashMap k) where mapMaybe = HM.mapMaybe
witherable.cabal view
@@ -1,5 +1,5 @@ name: witherable-version: 0.3.1+version: 0.3.2 synopsis: filterable traversable description: A stronger variant of `traverse` which can remove elements and generalised mapMaybe, catMaybes, filter homepage: https://github.com/fumieval/witherable@@ -26,6 +26,7 @@ base-orphans, containers >= 0.5, hashable,+ monoidal-containers, transformers, transformers-compat, unordered-containers,