packages feed

alignment 0.1.0.2 → 0.1.0.3

raw patch · 3 files changed

+20/−5 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ Data.Alignment: alignWith' :: Semialign f => (a -> c) -> (b -> d) -> f a -> f b -> This f c d
- Data.Alignment: alignWith :: Semialign f => (a -> c) -> (b -> d) -> f a -> f b -> This f c d
+ Data.Alignment: alignWith :: Semialign f => ((a, b) -> (c, d)) -> (a -> c) -> (b -> d) -> f a -> f b -> This f c d

Files

alignment.cabal view
@@ -1,7 +1,7 @@ -- documentation, see http://haskell.org/cabal/users-guide/  name:                   alignment-version:                0.1.0.2+version:                0.1.0.3 synopsis:               Zip-alignment description:   <<https://system-f.gitlab.io/logo/systemf-450x450.jpg>>
changelog.md view
@@ -1,3 +1,7 @@+0.1.0.3++* Change the type of `alignWith` to be more consistent.+ 0.1.0.2  * Add `allThoseAOr` and `allThoseBOr`.
src/Data/Alignment.hs view
@@ -169,16 +169,27 @@     -> f b     -> This f a b   align =-    alignWith (\x -> x) (\x -> x)+    alignWith (\x -> x) (\x -> x) (\x -> x)   alignWith ::-    (a -> c)+    ((a, b) -> (c, d))+    -> (a -> c)     -> (b -> d)     -> f a     -> f b     -> This f c d-  alignWith f g a b =-    bimap f g (align a b)+  alignWith f g h t1 t2 =+    case align t1 t2 of+      This t r ->+        This (fmap f t) (fmap (bimap (fmap g) (fmap h)) r)   {-# MINIMAL align | alignWith #-}+  alignWith' ::+    (a -> c)+    -> (b -> d)+    -> f a+    -> f b+    -> This f c d+  alignWith' f g =+    alignWith (bimap f g) f g  -- | --