packages feed

bifunctors 4.2 → 4.2.1

raw patch · 10 files changed

+54/−16 lines, 10 filesdep ~semigroupsPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: semigroups

API changes (from Hackage documentation)

+ Data.Biapplicative: instance Biapplicative Arg
+ Data.Bifoldable: instance Bifoldable Arg
+ Data.Bifunctor: instance Bifunctor Arg
+ Data.Bifunctor.Apply: instance Biapply Arg
+ Data.Bitraversable: instance Bitraversable Arg
+ Data.Semigroup.Bifoldable: instance Bifoldable1 Arg
+ Data.Semigroup.Bitraversable: instance Bitraversable1 Arg

Files

.travis.yml view
@@ -9,12 +9,6 @@       - "\x0313bifunctors\x03/\x0306%{branch}\x03 \x0314%{commit}\x03 %{build_url} %{message}"  env:- # - GHCVER=7.0.1- # - GHCVER=7.0.2- # - GHCVER=7.0.3- # - GHCVER=7.0.4- # - GHCVER=7.2.1- # - GHCVER=7.2.2  - GHCVER=7.4.1  - GHCVER=7.4.2  - GHCVER=7.6.1@@ -41,7 +35,7 @@ script:  - cabal-1.18 configure --enable-tests -v2  - cabal-1.18 build --ghc-options=-ddump-minimal-imports- - packunused+ # - packunused  - packdeps bifunctors.cabal  - cabal-1.18 test  - cabal-1.18 check
bifunctors.cabal view
@@ -1,6 +1,6 @@ name:          bifunctors category:      Data, Functors-version:       4.2+version:       4.2.1 license:       BSD3 cabal-version: >= 1.6 license-file:  LICENSE@@ -23,8 +23,9 @@   hs-source-dirs: src   build-depends:     base          >= 4.5 && < 5,-    semigroups    >= 0.8.3.1,+    semigroups    >= 0.8.3.1 && < 1,     semigroupoids == 4.*,+     tagged        >= 0.7.3 && < 1    if impl(ghc<7.9)
old-src/Data/Bifunctor.hs view
@@ -16,6 +16,7 @@  import Control.Applicative import Data.Tagged+import Data.Semigroup  -- | Minimal definition either 'bimap' or 'first' and 'second' @@ -78,6 +79,11 @@ instance Bifunctor (,) where   bimap f g ~(a, b) = (f a, g b)   {-# INLINE bimap #-}++#if MIN_VERSION_semigroups(0,16,2)+instance Bifunctor Arg where+  bimap f g (Arg a b) = Arg (f a) (g b)+#endif  instance Bifunctor ((,,) x) where   bimap f g ~(x, a, b) = (x, f a, g b)
src/Data/Biapplicative.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module      :  Data.Bifunctor.Apply@@ -22,7 +23,7 @@ import Control.Applicative import Data.Bifunctor import Data.Bifunctor.Apply ((<<$>>))-import Data.Monoid+import Data.Semigroup import Data.Tagged  infixl 4 <<*>>, <<*, *>>, <<**>>@@ -67,6 +68,14 @@   {-# INLINE bipure #-}   (f, g) <<*>> (a, b) = (f a, g b)   {-# INLINE (<<*>>) #-}++#if MIN_VERSION_semigroups(0,16,2)+instance Biapplicative Arg where+  bipure = Arg+  {-# INLINE bipure #-}+  Arg f g <<*>> Arg a b = Arg (f a) (g b)+  {-# INLINE (<<*>>) #-}+#endif  instance Monoid x => Biapplicative ((,,) x) where   bipure = (,,) mempty
src/Data/Bifoldable.hs view
@@ -30,7 +30,7 @@   ) where  import Control.Applicative-import Data.Monoid+import Data.Semigroup import Data.Tagged  -- | Minimal definition either 'bifoldr' or 'bifoldMap'@@ -89,6 +89,11 @@  #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708   {-# MINIMAL bifoldr | bifoldMap #-}+#endif++#if MIN_VERSION_semigroups(0,16,2)+instance Bifoldable Arg where+  bifoldMap f g (Arg a b) = f a `mappend` g b #endif  instance Bifoldable (,) where
src/Data/Bifunctor/Apply.hs view
@@ -1,7 +1,8 @@+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module      :  Data.Bifunctor.Apply--- Copyright   :  (C) 2011 Edward Kmett,+-- Copyright   :  (C) 2011-2015 Edward Kmett, -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  Edward Kmett <ekmett@gmail.com>@@ -66,6 +67,12 @@ instance Biapply (,) where   (f, g) <<.>> (a, b) = (f a, g b)   {-# INLINE (<<.>>) #-}++#if MIN_VERSION_semigroups(0,16,2)+instance Biapply Arg where+  Arg f g <<.>> Arg a b = Arg (f a) (g b)+  {-# INLINE (<<.>>) #-}+#endif  instance Semigroup x => Biapply ((,,) x) where   (x, f, g) <<.>> (x', a, b) = (x <> x', f a, g b)
src/Data/Bifunctor/Flip.hs view
@@ -24,7 +24,7 @@ import Data.Semigroup.Bitraversable import Data.Traversable --- | Make a 'Functor' over the first argument of a 'Bifunctor'.+-- | Make a 'Bifunctor' flipping the arguments of a 'Bifunctor'. newtype Flip p a b = Flip { runFlip :: p b a }   deriving (Eq,Ord,Show,Read) 
src/Data/Bitraversable.hs view
@@ -23,7 +23,7 @@ import Control.Applicative import Data.Bifunctor import Data.Bifoldable-import Data.Monoid+import Data.Semigroup import Data.Tagged  -- | Minimal complete definition either 'bitraverse' or 'bisequenceA'.@@ -149,6 +149,11 @@  #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708   {-# MINIMAL bitraverse | bisequenceA #-}+#endif++#if MIN_VERSION_semigroups(0,16,2)+instance Bitraversable Arg where+  bitraverse f g (Arg a b) = Arg <$> f a <*> g b #endif  instance Bitraversable (,) where
src/Data/Semigroup/Bifoldable.hs view
@@ -1,7 +1,8 @@+{-# LANGUAGE CPP #-} ----------------------------------------------------------------------------- -- | -- Module      :  Data.Semigroup.Foldable--- Copyright   :  (C) 2011 Edward Kmett+-- Copyright   :  (C) 2011-2015 Edward Kmett -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  Edward Kmett <ekmett@gmail.com>@@ -32,6 +33,11 @@   bifoldMap1 :: Semigroup m => (a -> m) -> (b -> m) -> t a b -> m   bifoldMap1 f g = maybe (error "bifoldMap1") id . getOption . bifoldMap (Option . Just . f) (Option . Just . g)   {-# INLINE bifoldMap1 #-}++#if MIN_VERSION_semigroups(0,16,2)+instance Bifoldable1 Arg where+  bifoldMap1 f g (Arg a b) = f a <> g b+#endif  instance Bifoldable1 Either where   bifoldMap1 f _ (Left a) = f a
src/Data/Semigroup/Bitraversable.hs view
@@ -2,7 +2,7 @@ ----------------------------------------------------------------------------- -- | -- Module      :  Data.Semigroup.Bitraversable--- Copyright   :  (C) 2011 Edward Kmett+-- Copyright   :  (C) 2011-2015 Edward Kmett -- License     :  BSD-style (see the file LICENSE) -- -- Maintainer  :  Edward Kmett <ekmett@gmail.com>@@ -34,6 +34,11 @@  #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708   {-# MINIMAL bitraverse1 | bisequence1 #-}+#endif++#if MIN_VERSION_semigroups(0,16,2)+instance Bitraversable1 Arg where+  bitraverse1 f g (Arg a b) = Arg <$> f a <.> g b #endif  bifoldMap1Default :: (Bitraversable1 t, Semigroup m) => (a -> m) -> (b -> m) -> t a b -> m