these 0.7.2 → 0.7.3
raw patch · 3 files changed
+16/−4 lines, 3 filesdep ~aesondep ~semigroupoidsdep ~vector
Dependency ranges changed: aeson, semigroupoids, vector, vector-instances
Files
- CHANGELOG.md +4/−0
- Data/Align.hs +10/−2
- these.cabal +2/−2
CHANGELOG.md view
@@ -1,3 +1,7 @@+# 0.7.3++- Add `salign :: (Align f, Semigroup a) => f a -> f a -> f a`+ # 0.7.2 - Support `aeson-1`: add `FromJSON1`, `FromJSON2` `ToJSON1`, and `ToJSON2` `These` instances.
Data/Align.hs view
@@ -8,7 +8,7 @@ module Data.Align ( Align(..) -- * Specialized aligns- , malign, padZip, padZipWith+ , malign, salign, padZip, padZipWith , lpadZip, lpadZipWith , rpadZip, rpadZipWith , alignVectorWith@@ -34,7 +34,8 @@ import Data.Hashable (Hashable(..)) import Data.HashMap.Strict (HashMap) import Data.Maybe (catMaybes)-import Data.Monoid hiding (Product)+import Data.Monoid hiding (Product, (<>))+import Data.Semigroup (Semigroup (..)) import Data.Sequence (Seq) import Data.These import qualified Data.Vector as V@@ -234,8 +235,15 @@ merge _ _ = oops "Align HashMap: merge" -- | Align two structures and combine with 'mappend'.+--+-- See `salign`. `malign` will be deprecated after `Semigroup` becomes a super+-- class of `Monoid` malign :: (Align f, Monoid a) => f a -> f a -> f a malign = alignWith (mergeThese mappend)++-- | Align two structures and combine with '<>'.+salign :: (Align f, Semigroup a) => f a -> f a -> f a+salign = alignWith (mergeThese (<>)) -- | Align two structures as in 'zip', but filling in blanks with 'Nothing'. padZip :: (Align f) => f a -> f b -> f (Maybe a, Maybe b)
these.cabal view
@@ -1,5 +1,5 @@ Name: these-Version: 0.7.2+Version: 0.7.3 Synopsis: An either-or-both data type & a generalized 'zip with padding' typeclass Homepage: https://github.com/isomorphism/these License: BSD3@@ -46,7 +46,7 @@ keys >= 3.10 && < 3.12, mtl >= 2 && < 2.3, profunctors >= 3 && < 5.3,- QuickCheck >= 2.8 && < 2.9.2,+ QuickCheck >= 2.8 && < 2.9.3, semigroupoids >= 1.0 && < 5.2, transformers >= 0.2 && < 0.6, transformers-compat >= 0.2 && < 0.6,