witherable 0.1 → 0.1.1
raw patch · 2 files changed
+7/−1 lines, 2 files
Files
- src/Data/Witherable.hs +6/−0
- witherable.cabal +1/−1
src/Data/Witherable.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} module Data.Witherable where import qualified Data.Maybe as Maybe import qualified Data.IntMap.Lazy as IM @@ -46,6 +47,11 @@ instance (Eq k, Hashable k) => Witherable (HM.HashMap k) where 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 + traverse _ (Const r) = pure (Const r) +#endif instance Witherable (Const r) where wither _ (Const r) = pure (Const r)
witherable.cabal view
@@ -1,5 +1,5 @@ name: witherable -version: 0.1 +version: 0.1.1 synopsis: Generalization of catMaybes -- description: homepage: https://github.com/fumieval/witherable