Hello community,

here is the log from the commit of package ghc-comonad for openSUSE:Factory 
checked in at 2016-10-23 12:50:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-comonad (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-comonad.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-comonad"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-comonad/ghc-comonad.changes  2016-07-21 
08:08:33.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-comonad.new/ghc-comonad.changes     
2016-10-23 12:50:50.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Sep 15 07:03:15 UTC 2016 - [email protected]
+
+- Update to version 5 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  comonad-4.2.7.2.tar.gz

New:
----
  comonad-5.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-comonad.spec ++++++
--- /var/tmp/diff_new_pack.3PLnGu/_old  2016-10-23 12:50:51.000000000 +0200
+++ /var/tmp/diff_new_pack.3PLnGu/_new  2016-10-23 12:50:51.000000000 +0200
@@ -19,15 +19,14 @@
 %global pkg_name comonad
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        4.2.7.2
+Version:        5
 Release:        0
 Summary:        Comonads
 License:        BSD-2-Clause
-Group:          System/Libraries
+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
 BuildRequires:  ghc-Cabal-devel
-# Begin cabal-rpm deps:
 BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-contravariant-devel
 BuildRequires:  ghc-distributive-devel
@@ -42,7 +41,6 @@
 BuildRequires:  ghc-doctest-devel
 BuildRequires:  ghc-filepath-devel
 %endif
-# End cabal-rpm deps
 
 %description
 Comonads.
@@ -61,20 +59,14 @@
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
-
 %build
 %ghc_lib_build
 
-
 %install
 %ghc_lib_install
 
-
 %check
-%if %{with tests}
-%{cabal} test
-%endif
-
+%cabal_test
 
 %post devel
 %ghc_pkg_recache

++++++ comonad-4.2.7.2.tar.gz -> comonad-5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/.travis.yml new/comonad-5/.travis.yml
--- old/comonad-4.2.7.2/.travis.yml     2015-07-24 15:42:09.000000000 +0200
+++ new/comonad-5/.travis.yml   2016-01-16 23:20:56.000000000 +0100
@@ -5,7 +5,7 @@
  - GHCVER=7.4.2 CABALVER=1.16
  - GHCVER=7.6.3 CABALVER=1.16
  - GHCVER=7.8.4 CABALVER=1.18
- - GHCVER=7.10.1 CABALVER=1.22
+ - GHCVER=7.10.2 CABALVER=1.22
  - GHCVER=head CABALVER=1.22
 
 matrix:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/CHANGELOG.markdown 
new/comonad-5/CHANGELOG.markdown
--- old/comonad-4.2.7.2/CHANGELOG.markdown      2015-07-24 15:42:09.000000000 
+0200
+++ new/comonad-5/CHANGELOG.markdown    2016-01-16 23:20:56.000000000 +0100
@@ -1,3 +1,11 @@
+5
+-
+* Removed module `Data.Functor.Coproduct` in favor of the `transformers`
+  package's `Data.Functor.Sum`. n.b. Compatibility with older versions of
+  `transformers` is possible using `transformers-compat`.
+* Add `Comonad` instance for `Data.Functor.Sum.Sum`
+* GHC 8 compatibility
+
 4.2.7.2
 -------
 * Compiles warning-free on GHC 7.10
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/README.markdown 
new/comonad-5/README.markdown
--- old/comonad-4.2.7.2/README.markdown 2015-07-24 15:42:09.000000000 +0200
+++ new/comonad-5/README.markdown       2016-01-16 23:20:56.000000000 +0100
@@ -1,7 +1,7 @@
 comonad
 =======
 
-[![Build 
Status](https://secure.travis-ci.org/ekmett/comonad.png?branch=master)](http://travis-ci.org/ekmett/comonad)
+[![Hackage](https://img.shields.io/hackage/v/comonad.svg)](https://hackage.haskell.org/package/comonad)
 [![Build 
Status](https://secure.travis-ci.org/ekmett/comonad.png?branch=master)](http://travis-ci.org/ekmett/comonad)
 
 This package provides comonads, the categorical dual of monads.
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/comonad.cabal 
new/comonad-5/comonad.cabal
--- old/comonad-4.2.7.2/comonad.cabal   2015-07-24 15:42:09.000000000 +0200
+++ new/comonad-5/comonad.cabal 2016-01-16 23:20:56.000000000 +0100
@@ -1,6 +1,6 @@
 name:          comonad
 category:      Control, Comonads
-version:       4.2.7.2
+version:       5
 license:       BSD3
 cabal-version: >= 1.10
 license-file:  LICENSE
@@ -14,7 +14,7 @@
 synopsis:      Comonads
 description:   Comonads
 build-type:    Custom
-tested-with:   GHC==7.0.1, GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 
7.6.3, GHC == 7.8.4, GHC == 7.10.1
+tested-with:   GHC==7.0.1, GHC == 7.0.4, GHC == 7.2.2, GHC == 7.4.2, GHC == 
7.6.3, GHC == 7.8.4, GHC == 7.10.2
 extra-source-files:
   .ghci
   .gitignore
@@ -75,7 +75,7 @@
     base                >= 4       && < 5,
     semigroups          >= 0.8.3.1 && < 1,
     tagged              >= 0.1     && < 1,
-    transformers        >= 0.2     && < 0.5,
+    transformers        >= 0.2     && < 0.6,
     transformers-compat >= 0.3     && < 1
 
   if flag(containers)
@@ -103,7 +103,6 @@
     Control.Comonad.Trans.Store
     Control.Comonad.Trans.Traced
     Data.Functor.Composition
-    Data.Functor.Coproduct
 
   other-extensions:
     CPP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/src/Control/Comonad/Trans/Env.hs 
new/comonad-5/src/Control/Comonad/Trans/Env.hs
--- old/comonad-4.2.7.2/src/Control/Comonad/Trans/Env.hs        2015-07-24 
15:42:09.000000000 +0200
+++ new/comonad-5/src/Control/Comonad/Trans/Env.hs      2016-01-16 
23:20:56.000000000 +0100
@@ -5,6 +5,9 @@
 #elif __GLASGOW_HASKELL__ >= 702
 {-# LANGUAGE Trustworthy #-}
 #endif
+#ifndef MIN_VERSION_base
+#define MIN_VERSION_base(x,y,z) 1
+#endif
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Control.Comonad.Trans.Env
@@ -59,6 +62,9 @@
   , local
   ) where
 
+#if !(MIN_VERSION_base(4,8,0))
+import Control.Applicative
+#endif
 import Control.Comonad
 import Control.Comonad.Hoist.Class
 import Control.Comonad.Trans.Class
@@ -147,6 +153,10 @@
 instance ComonadTrans (EnvT e) where
   lower (EnvT _ wa) = wa
 
+instance (Monoid e, Applicative m) => Applicative (EnvT e m) where
+  pure = EnvT mempty . pure
+  EnvT ef wf <*> EnvT ea wa = EnvT (ef `mappend` ea) (wf <*> wa)
+
 -- | Gets rid of the environment. This differs from 'extract' in that it will
 --   not continue extracting the value from the contained comonad.
 lowerEnvT :: EnvT e w a -> w a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/src/Control/Comonad/Trans/Traced.hs 
new/comonad-5/src/Control/Comonad/Trans/Traced.hs
--- old/comonad-4.2.7.2/src/Control/Comonad/Trans/Traced.hs     2015-07-24 
15:42:09.000000000 +0200
+++ new/comonad-5/src/Control/Comonad/Trans/Traced.hs   2016-01-16 
23:20:56.000000000 +0100
@@ -89,7 +89,7 @@
 instance Monoid m => ComonadTrans (TracedT m) where
   lower = fmap ($ mempty) . runTracedT
 
-instance Monoid m => ComonadHoist (TracedT m) where
+instance ComonadHoist (TracedT m) where
   cohoist l = TracedT . l . runTracedT
 
 #ifdef MIN_VERSION_distributive
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/src/Control/Comonad.hs 
new/comonad-5/src/Control/Comonad.hs
--- old/comonad-4.2.7.2/src/Control/Comonad.hs  2015-07-24 15:42:09.000000000 
+0200
+++ new/comonad-5/src/Control/Comonad.hs        2016-01-16 23:20:56.000000000 
+0100
@@ -53,6 +53,7 @@
 #endif
 import Control.Monad.Trans.Identity
 import Data.Functor.Identity
+import qualified Data.Functor.Sum as FSum
 import Data.List.NonEmpty hiding (map)
 import Data.Semigroup hiding (Product)
 import Data.Tagged
@@ -200,6 +201,19 @@
   extract ~(a :| _) = a
   {-# INLINE extract #-}
 
+coproduct :: (f a -> b) -> (g a -> b) -> FSum.Sum f g a -> b
+coproduct f _ (FSum.InL x) = f x
+coproduct _ g (FSum.InR y) = g y
+{-# INLINE coproduct #-}
+
+instance (Comonad f, Comonad g) => Comonad (FSum.Sum f g) where
+  extend f = coproduct
+               (FSum.InL . extend (f . FSum.InL))
+               (FSum.InR . extend (f . FSum.InR))
+  extract = coproduct extract extract
+  {-# INLINE extract #-}
+
+
 -- | @ComonadApply@ is to @Comonad@ like @Applicative@ is to @Monad@.
 --
 -- Mathematically, it is a strong lax symmetric semi-monoidal comonad on the
@@ -385,7 +399,7 @@
   Cokleisli f <*> Cokleisli a = Cokleisli (\w -> f w (a w))
 
 instance Monad (Cokleisli w a) where
-  return = Cokleisli . const
+  return = pure
   Cokleisli k >>= f = Cokleisli $ \w -> runCokleisli (f (k w)) w
 
 #if !(MIN_VERSION_base(4,7,0))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/comonad-4.2.7.2/src/Data/Functor/Coproduct.hs 
new/comonad-5/src/Data/Functor/Coproduct.hs
--- old/comonad-4.2.7.2/src/Data/Functor/Coproduct.hs   2015-07-24 
15:42:09.000000000 +0200
+++ new/comonad-5/src/Data/Functor/Coproduct.hs 1970-01-01 01:00:00.000000000 
+0100
@@ -1,66 +0,0 @@
-{-# LANGUAGE CPP #-}
-#if __GLASGOW_HASKELL__ >= 704
-{-# LANGUAGE Safe #-}
-#elif __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
-#endif
------------------------------------------------------------------------------
--- |
--- Module      :  Data.Functor.Coproduct
--- Copyright   :  (C) 2008-2011 Edward Kmett
--- License     :  BSD-style (see the file LICENSE)
---
--- Maintainer  :  Edward Kmett <[email protected]>
--- Stability   :  provisional
--- Portability :  portable
-----------------------------------------------------------------------------
-module Data.Functor.Coproduct
-  ( Coproduct(..)
-  , left
-  , right
-  , coproduct
-  ) where
-
-import Control.Comonad
-#if __GLASGOW_HASKELL__ < 710
-import Data.Foldable
-import Data.Traversable
-#endif
-
-#ifdef MIN_VERSION_contravariant
-import Data.Functor.Contravariant
-#endif
-
-newtype Coproduct f g a = Coproduct { getCoproduct :: Either (f a) (g a) }
-  deriving (Eq, Ord, Read, Show)
-
-left :: f a -> Coproduct f g a
-left = Coproduct . Left
-
-right :: g a -> Coproduct f g a
-right = Coproduct . Right
-
-coproduct :: (f a -> b) -> (g a -> b) -> Coproduct f g a -> b
-coproduct f g = either f g . getCoproduct
-
-instance (Functor f, Functor g) => Functor (Coproduct f g) where
-  fmap f = Coproduct . coproduct (Left . fmap f) (Right . fmap f)
-
-instance (Foldable f, Foldable g) => Foldable (Coproduct f g) where
-  foldMap f = coproduct (foldMap f) (foldMap f)
-
-instance (Traversable f, Traversable g) => Traversable (Coproduct f g) where
-  traverse f = coproduct
-    (fmap (Coproduct . Left) . traverse f)
-    (fmap (Coproduct . Right) . traverse f)
-
-instance (Comonad f, Comonad g) => Comonad (Coproduct f g) where
-  extend f = Coproduct . coproduct
-    (Left . extend (f . Coproduct . Left))
-    (Right . extend (f . Coproduct . Right))
-  extract = coproduct extract extract
-
-#ifdef MIN_VERSION_contravariant
-instance (Contravariant f, Contravariant g) => Contravariant (Coproduct f g) 
where
-  contramap f = Coproduct . coproduct (Left . contramap f) (Right . contramap 
f)
-#endif


Reply via email to