Hello community, here is the log from the commit of package ghc-bifunctors for openSUSE:Factory checked in at 2017-06-04 01:51:43 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-bifunctors (Old) and /work/SRC/openSUSE:Factory/.ghc-bifunctors.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-bifunctors" Sun Jun 4 01:51:43 2017 rev:8 rq:494138 version:5.4.2 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-bifunctors/ghc-bifunctors.changes 2017-01-12 15:47:00.358337624 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-bifunctors.new/ghc-bifunctors.changes 2017-06-04 01:51:49.380065358 +0200 @@ -1,0 +2,5 @@ +Mon Apr 24 12:26:43 UTC 2017 - [email protected] + +- Update to version 5.4.2 with cabal2obs. + +------------------------------------------------------------------- Old: ---- bifunctors-5.4.1.tar.gz bifunctors.cabal New: ---- bifunctors-5.4.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-bifunctors.spec ++++++ --- /var/tmp/diff_new_pack.eAfQGH/_old 2017-06-04 01:51:51.179811081 +0200 +++ /var/tmp/diff_new_pack.eAfQGH/_new 2017-06-04 01:51:51.179811081 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-bifunctors # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -19,14 +19,13 @@ %global pkg_name bifunctors %bcond_with tests Name: ghc-%{pkg_name} -Version: 5.4.1 +Version: 5.4.2 Release: 0 Summary: Bifunctors License: BSD-2-Clause Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: ghc-Cabal-devel BuildRequires: ghc-base-orphans-devel BuildRequires: ghc-comonad-devel @@ -59,7 +58,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build @@ -82,5 +80,6 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) +%doc CHANGELOG.markdown README.markdown %changelog ++++++ bifunctors-5.4.1.tar.gz -> bifunctors-5.4.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bifunctors-5.4.1/.travis.yml new/bifunctors-5.4.2/.travis.yml --- old/bifunctors-5.4.1/.travis.yml 2016-07-19 17:38:29.000000000 +0200 +++ new/bifunctors-5.4.2/.travis.yml 2017-04-19 17:08:41.000000000 +0200 @@ -31,9 +31,12 @@ - env: CABALVER=1.22 GHCVER=7.10.3 compiler: ": #GHC 7.10.3" addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.3], sources: [hvr-ghc]}} - - env: CABALVER=1.24 GHCVER=8.0.1 - compiler: ": #GHC 8.0.1" - addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.1], sources: [hvr-ghc]}} + - env: CABALVER=1.24 GHCVER=8.0.2 + compiler: ": #GHC 8.0.2" + addons: {apt: {packages: [cabal-install-1.24,ghc-8.0.2], sources: [hvr-ghc]}} + - env: CABALVER=2.0 GHCVER=8.2.1 + compiler: ": #GHC 8.2.1" + addons: {apt: {packages: [cabal-install-2.0,ghc-8.2.1], sources: [hvr-ghc]}} - env: CABALVER=head GHCVER=head compiler: ": #GHC head" addons: {apt: {packages: [cabal-install-head,ghc-head], sources: [hvr-ghc]}} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bifunctors-5.4.1/CHANGELOG.markdown new/bifunctors-5.4.2/CHANGELOG.markdown --- old/bifunctors-5.4.1/CHANGELOG.markdown 2016-07-19 17:38:29.000000000 +0200 +++ new/bifunctors-5.4.2/CHANGELOG.markdown 2017-04-19 17:08:41.000000000 +0200 @@ -1,3 +1,8 @@ +5.4.2 +----- +* Make `deriveBitraversable` use `liftA2` in derived implementations of `bitraverse` when possible, now that `liftA2` is a class method of `Applicative` (as of GHC 8.2) +* Backport slightly more efficient implementations of `bimapDefault` and `bifoldMapDefault` + 5.4.1 ----- * Add explicit `Safe`, `Trustworthy`, and `Unsafe` annotations. In particular, annotate the `Data.Bifoldable` module as `Trustworthy` (previously, it was inferred to be `Unsafe`). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bifunctors-5.4.1/bifunctors.cabal new/bifunctors-5.4.2/bifunctors.cabal --- old/bifunctors-5.4.1/bifunctors.cabal 2016-07-19 17:38:29.000000000 +0200 +++ new/bifunctors-5.4.2/bifunctors.cabal 2017-04-19 17:08:41.000000000 +0200 @@ -1,6 +1,6 @@ name: bifunctors category: Data, Functors -version: 5.4.1 +version: 5.4.2 license: BSD3 cabal-version: >= 1.8 license-file: LICENSE @@ -13,12 +13,12 @@ synopsis: Bifunctors description: Bifunctors build-type: Simple -tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1 +tested-with: GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.2 extra-source-files: .travis.yml CHANGELOG.markdown README.markdown source-repository head type: git - location: git://github.com/ekmett/bifunctors.git + location: https://github.com/ekmett/bifunctors.git flag semigroups default: True @@ -43,7 +43,7 @@ base-orphans >= 0.5.2 && < 1, comonad >= 4 && < 6, containers >= 0.1 && < 0.6, - template-haskell >= 2.4 && < 2.12, + template-haskell >= 2.4 && < 2.13, transformers >= 0.2 && < 0.6, transformers-compat >= 0.5 && < 0.6 @@ -99,6 +99,7 @@ bifunctors, hspec >= 1.8, QuickCheck >= 2 && < 3, + template-haskell, transformers, transformers-compat diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bifunctors-5.4.1/old-src/ghc801/Data/Bitraversable.hs new/bifunctors-5.4.2/old-src/ghc801/Data/Bitraversable.hs --- old/bifunctors-5.4.1/old-src/ghc801/Data/Bitraversable.hs 2016-07-19 17:38:29.000000000 +0200 +++ new/bifunctors-5.4.2/old-src/ghc801/Data/Bitraversable.hs 2017-04-19 17:08:41.000000000 +0200 @@ -1,10 +1,9 @@ {-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} +{-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE StandaloneDeriving #-} #if __GLASGOW_HASKELL__ >= 704 -{-# LANGUAGE Safe #-} -#elif __GLASGOW_HASKELL__ >= 702 {-# LANGUAGE Trustworthy #-} #endif @@ -39,8 +38,15 @@ import Data.Bifunctor import Data.Bifoldable import Data.Functor.Constant +import Data.Functor.Identity import Data.Orphans () +#if MIN_VERSION_base(4,7,0) +import Data.Coerce (coerce) +#else +import Unsafe.Coerce (unsafeCoerce) +#endif + #if !(MIN_VERSION_base(4,8,0)) import Data.Monoid #endif @@ -69,7 +75,7 @@ -- element on which an action can be performed, 'Bitraversable' data structures -- have two such varieties of elements. -- --- A definition of 'traverse' must satisfy the following laws: +-- A definition of 'bitraverse' must satisfy the following laws: -- -- [/naturality/] -- @'bitraverse' (t . f) (t . g) ≡ t . 'bitraverse' f g@ @@ -295,24 +301,29 @@ bimapAccumR f g s t = runStateR (bitraverse (StateR . flip f) (StateR . flip g) t) s {-# INLINE bimapAccumR #-} -newtype Id a = Id { getId :: a } - -instance Functor Id where - fmap f (Id x) = Id (f x) - {-# INLINE fmap #-} - -instance Applicative Id where - pure = Id - {-# INLINE pure #-} - Id f <*> Id x = Id (f x) - {-# INLINE (<*>) #-} - -- | A default definition of 'bimap' in terms of the 'Bitraversable' operations. -bimapDefault :: Bitraversable t => (a -> b) -> (c -> d) -> t a c -> t b d -bimapDefault f g = getId . bitraverse (Id . f) (Id . g) +-- +-- @'bimapDefault' f g ≡ +-- 'runIdentity' . 'bitraverse' ('Identity' . f) ('Identity' . g)@ +bimapDefault :: forall t a b c d . Bitraversable t + => (a -> b) -> (c -> d) -> t a c -> t b d +bimapDefault = coerce + (bitraverse :: (a -> Identity b) + -> (c -> Identity d) -> t a c -> Identity (t b d)) {-# INLINE bimapDefault #-} -- | A default definition of 'bifoldMap' in terms of the 'Bitraversable' operations. -bifoldMapDefault :: (Bitraversable t, Monoid m) => (a -> m) -> (b -> m) -> t a b -> m -bifoldMapDefault f g = getConst . bitraverse (Const . f) (Const . g) +-- +-- @'bifoldMapDefault' f g ≡ +-- 'getConst' . 'bitraverse' ('Const' . f) ('Const' . g)@ +bifoldMapDefault :: forall t m a b . (Bitraversable t, Monoid m) + => (a -> m) -> (b -> m) -> t a b -> m +bifoldMapDefault = coerce + (bitraverse :: (a -> Const m ()) + -> (b -> Const m ()) -> t a b -> Const m (t () ())) {-# INLINE bifoldMapDefault #-} + +#if !(MIN_VERSION_base(4,7,0)) +coerce :: a -> b +coerce = unsafeCoerce +#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bifunctors-5.4.1/src/Data/Bifunctor/TH/Internal.hs new/bifunctors-5.4.2/src/Data/Bifunctor/TH/Internal.hs --- old/bifunctors-5.4.1/src/Data/Bifunctor/TH/Internal.hs 2016-07-19 17:38:29.000000000 +0200 +++ new/bifunctors-5.4.2/src/Data/Bifunctor/TH/Internal.hs 2017-04-19 17:08:41.000000000 +0200 @@ -592,6 +592,9 @@ apValName :: Name apValName = mkNameG_v "base" "GHC.Base" "<*>" +liftA2ValName :: Name +liftA2ValName = mkNameG_v "base" "GHC.Base" "liftA2" + mappendValName :: Name mappendValName = mkNameG_v "base" "GHC.Base" "mappend" @@ -610,6 +613,9 @@ apValName :: Name apValName = mkNameG_v "base" "Control.Applicative" "<*>" +liftA2ValName :: Name +liftA2ValName = mkNameG_v "base" "Control.Applicative" "liftA2" + mappendValName :: Name mappendValName = mkNameG_v "base" "Data.Monoid" "mappend" @@ -617,7 +623,7 @@ memptyValName = mkNameG_v "base" "Data.Monoid" "mempty" #endif -#if __GLASGOW_HASKELL__ >= 801 +#if MIN_VERSION_base(4,10,0) bifoldableTypeName :: Name bifoldableTypeName = mkNameG_tc "base" "Data.Bifoldable" "Bifoldable" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bifunctors-5.4.1/src/Data/Bifunctor/TH.hs new/bifunctors-5.4.2/src/Data/Bifunctor/TH.hs --- old/bifunctors-5.4.1/src/Data/Bifunctor/TH.hs 2016-07-19 17:38:29.000000000 +0200 +++ new/bifunctors-5.4.2/src/Data/Bifunctor/TH.hs 2017-04-19 17:08:41.000000000 +0200 @@ -1189,9 +1189,10 @@ conExp <- conExpQ let go :: [Exp] -> Exp - go [] = VarE pureValName `AppE` conExp - go (e:es) = foldl' (\e1 e2 -> InfixE (Just e1) (VarE apValName) (Just e2)) - (VarE fmapValName `AppE` conExp `AppE` e) es + go [] = VarE pureValName `AppE` conExp + go [e] = VarE fmapValName `AppE` conExp `AppE` e + go (e1:e2:es) = foldl' (\se1 se2 -> InfixE (Just se1) (VarE apValName) (Just se2)) + (VarE liftA2ValName `AppE` conExp `AppE` e1 `AppE` e2) es return . go . rights $ ess
