packages feed

witherable 0.1.1 → 0.1.1.1

raw patch · 2 files changed

+6/−2 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

src/Data/Witherable.hs view
@@ -12,6 +12,7 @@ import Data.Hashable
 import Data.Functor.Identity
 import Control.Monad.Trans.Maybe
+import Data.Monoid
 
 -- | Like `traverse`, but you can remove elements instead of updating them.
 -- @traverse f = wither (fmap Just . f)@
@@ -49,7 +50,10 @@   wither f = fmap HM.fromList . wither (\(i, a) -> fmap ((,) i) <$> f a) . HM.toList
 
 #if !(MIN_VERSION_base(4,7,0))
-instance Traversable (Const r) where
+instance F.Foldable (Const r) where
+  foldMap _ _ = mempty
+
+instance T.Traversable (Const r) where
   traverse _ (Const r) = pure (Const r)
 #endif
 
witherable.cabal view
@@ -1,5 +1,5 @@ name:                witherable
-version:             0.1.1
+version:             0.1.1.1
 synopsis:            Generalization of catMaybes
 -- description:         
 homepage:            https://github.com/fumieval/witherable