packages feed

semialign 1.1 → 1.1.0.1

raw patch · 5 files changed

+32/−21 lines, 5 filesdep −base-compatPVP ok

version bump matches the API change (PVP)

Dependencies removed: base-compat

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,3 +1,7 @@+# 1.1.0.1++- Drop `base-compat` dependency+ # 1.1  - Split `Semialign` into `Semialign` and `Zip`.
semialign.cabal view
@@ -1,6 +1,6 @@ cabal-version:      >=1.10 name:               semialign-version:            1.1+version:            1.1.0.1 synopsis:   Align and Zip type-classes from the common Semialign ancestor. @@ -29,7 +29,8 @@      || ==8.2.2      || ==8.4.4      || ==8.6.5-     || ==8.8.1+     || ==8.8.3+     || ==8.10.1   , GHCJS ==8.4  source-repository head@@ -59,17 +60,16 @@    -- ghc boot libs   build-depends:-      base          >=4.5.1.0 && <4.14+      base          >=4.5.1.0 && <4.15     , containers    >=0.4.2.1 && <0.7     , transformers  >=0.3.0.0 && <0.6    -- These-  build-depends:    these >=1 && <1.1+  build-depends:    these >=1 && <1.2    -- other dependencies   build-depends:-      base-compat           >=0.10.5   && <0.12-    , hashable              >=1.2.7.0  && <1.4+      hashable              >=1.2.7.0  && <1.4     , tagged                >=0.8.6    && <0.9     , unordered-containers  >=0.2.8.0  && <0.3     , vector                >=0.12.0.2 && <0.13
src/Data/Crosswalk.hs view
@@ -7,14 +7,14 @@     Bicrosswalk (..),     ) where -import Prelude ()-import Prelude.Compat-+import Control.Applicative   (pure, (<$>)) import Data.Bifoldable       (Bifoldable (..)) import Data.Bifunctor        (Bifunctor (..))+import Data.Foldable         (Foldable (..)) import Data.Functor.Compose  (Compose (..)) import Data.Functor.Identity (Identity (..)) import Data.Vector.Generic   (Vector)+import Prelude               (Either (..), Functor (fmap), Maybe (..), id, (.))  import qualified Data.Sequence       as Seq import qualified Data.Vector         as V@@ -82,8 +82,8 @@ -- instances for them  instance (Crosswalk f, Crosswalk g) => Crosswalk (Compose f g) where-    crosswalk f = id-        . fmap Compose -- can't coerce: maybe the Align-able thing has role nominal+    crosswalk f+        = fmap Compose -- can't coerce: maybe the Align-able thing has role nominal         . crosswalk (crosswalk f)         . getCompose 
src/Data/Semialign/Internal.hs view
@@ -4,12 +4,15 @@ {-# LANGUAGE Trustworthy                #-} module Data.Semialign.Internal where -import Prelude ()-import Prelude.Compat hiding (repeat, unzip, zip, zipWith)+import Prelude+       (Bool (..), Eq (..), Functor (fmap), Maybe (..), Monad (..), Ord (..),+       Ordering (..), String, error, flip, fst, id, maybe, snd, uncurry, ($),+       (++), (.)) -import qualified Prelude.Compat as Prelude+import qualified Prelude as Prelude -import Control.Applicative               (ZipList (..))+import Control.Applicative (ZipList (..), pure, (<$>))+import Data.Monoid         (Monoid (..)) import Data.Bifunctor                    (Bifunctor (..)) import Data.Functor.Compose              (Compose (..)) import Data.Functor.Identity             (Identity (..))@@ -267,12 +270,12 @@ -- but the right hand side is @[('That' 0, 'These' 0 0)]@. -- class Semialign f => Zip f where-    -- | Combines to structures by taking the intersection of their shapes+    -- | Combines two structures by taking the intersection of their shapes     -- and using pair to hold the elements.     zip :: f a -> f b -> f (a, b)     zip = zipWith (,)     ---    -- | Combines to structures by taking the intersection of their shapes+    -- | Combines two structures by taking the intersection of their shapes     -- and combining the elements with the given function.     zipWith :: (a -> b -> c) -> f a -> f b -> f c     zipWith f a b = uncurry f <$> zip a b
src/Data/Zip.hs view
@@ -12,10 +12,10 @@     Zippy (..),     ) where -import Prelude ()-import Prelude.Compat hiding (repeat, zipWith)--import Data.Semigroup (Semigroup (..))+import Control.Applicative (Applicative (..))+import Data.Monoid         (Monoid (..))+import Data.Semigroup      (Semigroup (..))+import Prelude             (Eq, Functor (..), Ord, Read, Show, ($), (.))  import Data.Semialign.Internal @@ -48,4 +48,8 @@     (<*>) = (<.>) #else     Zippy f <*> Zippy x = Zippy $ zipWith ($) f x+#endif++#if MIN_VERSION_base(4,10,0)+    liftA2 f (Zippy x) (Zippy y) = Zippy $ zipWith f x y #endif