Hello community,

here is the log from the commit of package ghc-contravariant for 
openSUSE:Factory checked in at 2015-09-17 09:19:13
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-contravariant (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-contravariant.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-contravariant"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-contravariant/ghc-contravariant.changes      
2015-08-05 06:51:58.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-contravariant.new/ghc-contravariant.changes 
2015-09-17 09:19:15.000000000 +0200
@@ -1,0 +2,6 @@
+Sun Sep 13 12:29:16 UTC 2015 - mimi...@gmail.com
+
+- update to 1.3.3
+* Add instance Monoid m => Divisible (Const m)
+
+-------------------------------------------------------------------

Old:
----
  contravariant-1.3.2.tar.gz

New:
----
  contravariant-1.3.3.tar.gz

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

Other differences:
------------------
++++++ ghc-contravariant.spec ++++++
--- /var/tmp/diff_new_pack.r6ItRA/_old  2015-09-17 09:19:15.000000000 +0200
+++ /var/tmp/diff_new_pack.r6ItRA/_new  2015-09-17 09:19:15.000000000 +0200
@@ -19,7 +19,7 @@
 %global pkg_name contravariant
 
 Name:           ghc-contravariant
-Version:        1.3.2
+Version:        1.3.3
 Release:        0
 Summary:        Contravariant functors
 License:        BSD-3-Clause

++++++ contravariant-1.3.2.tar.gz -> contravariant-1.3.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/contravariant-1.3.2/CHANGELOG.markdown 
new/contravariant-1.3.3/CHANGELOG.markdown
--- old/contravariant-1.3.2/CHANGELOG.markdown  2015-07-30 00:20:35.000000000 
+0200
+++ new/contravariant-1.3.3/CHANGELOG.markdown  2015-09-04 12:33:20.000000000 
+0200
@@ -1,3 +1,7 @@
+1.3.3
+-----
+* Add `instance Monoid m => Divisible (Const m)`
+
 1.3.2
 -----
 * Add `($<)` operator
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/contravariant-1.3.2/contravariant.cabal 
new/contravariant-1.3.3/contravariant.cabal
--- old/contravariant-1.3.2/contravariant.cabal 2015-07-30 00:20:35.000000000 
+0200
+++ new/contravariant-1.3.3/contravariant.cabal 2015-09-04 12:33:20.000000000 
+0200
@@ -1,6 +1,6 @@
 name:          contravariant
 category:      Control, Data
-version:       1.3.2
+version:       1.3.3
 license:       BSD3
 cabal-version: >= 1.6
 license-file:  LICENSE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/contravariant-1.3.2/src/Data/Functor/Contravariant/Divisible.hs 
new/contravariant-1.3.3/src/Data/Functor/Contravariant/Divisible.hs
--- old/contravariant-1.3.2/src/Data/Functor/Contravariant/Divisible.hs 
2015-07-30 00:20:35.000000000 +0200
+++ new/contravariant-1.3.3/src/Data/Functor/Contravariant/Divisible.hs 
2015-09-04 12:33:20.000000000 +0200
@@ -19,6 +19,7 @@
   , Decidable(..), chosen, lost
   ) where
 
+import Control.Applicative
 import Data.Functor.Contravariant
 
 #if __GLASGOW_HASKELL__ < 710
@@ -130,6 +131,10 @@
     (b, c) -> g b && h c
   conquer = Predicate $ const True
 
+instance Monoid m => Divisible (Const m) where
+  divide _ (Const a) (Const b) = Const (mappend a b)
+  conquer = Const mempty
+
 #if MIN_VERSION_StateVar
 instance Divisible SettableStateVar where
   divide k (SettableStateVar l) (SettableStateVar r) = SettableStateVar $ \ a 
-> case k a of
@@ -148,8 +153,8 @@
 -- source to the Cartesian product of the target.
 --
 -- @
--- 'choose' Left m ('lose' f)  = m
--- 'choose' Right ('lose' f) m = m
+-- 'choose' 'Left' m ('lose' f)  = m
+-- 'choose' 'Right' ('lose' f) m = m
 -- 'choose' f ('choose' g m n) o = 'divide' f' m ('divide' 'id' n o) where
 --   f' bcd = 'either' ('either' 'id' ('Right' . 'Left') . g) ('Right' . 
'Right') . f
 -- @
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/contravariant-1.3.2/src/Data/Functor/Contravariant.hs 
new/contravariant-1.3.3/src/Data/Functor/Contravariant.hs
--- old/contravariant-1.3.2/src/Data/Functor/Contravariant.hs   2015-07-30 
00:20:35.000000000 +0200
+++ new/contravariant-1.3.3/src/Data/Functor/Contravariant.hs   2015-09-04 
12:33:20.000000000 +0200
@@ -22,6 +22,8 @@
 #endif
 #endif
 
+{-# OPTIONS_GHC -fno-warn-deprecations #-}
+
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Data.Functor.Contravariant
@@ -66,6 +68,19 @@
 
 import Control.Category
 
+import Control.Monad.Trans.Error
+import Control.Monad.Trans.Except
+import Control.Monad.Trans.Identity
+import Control.Monad.Trans.List
+import Control.Monad.Trans.Maybe
+import qualified Control.Monad.Trans.RWS.Lazy as Lazy
+import qualified Control.Monad.Trans.RWS.Strict as Strict
+import Control.Monad.Trans.Reader
+import qualified Control.Monad.Trans.State.Lazy as Lazy
+import qualified Control.Monad.Trans.State.Strict as Strict
+import qualified Control.Monad.Trans.Writer.Lazy as Lazy
+import qualified Control.Monad.Trans.Writer.Strict as Strict
+
 import Data.Function (on)
 
 import Data.Functor.Product
@@ -74,7 +89,9 @@
 import Data.Functor.Compose
 import Data.Functor.Reverse
 
-#if __GLASGOW_HASKELL__ < 710
+#if MIN_VERSION_base(4,8,0)
+import Data.Monoid (Alt(..))
+#else
 import Data.Monoid (Monoid(..))
 #endif
 
@@ -149,6 +166,11 @@
 (>$$<) = flip contramap
 {-# INLINE (>$$<) #-}
 
+#if MIN_VERSION_base(4,8,0)
+instance Contravariant f => Contravariant (Alt f) where
+  contramap f = Alt . contramap f . getAlt
+#endif
+
 #ifdef GHC_GENERICS
 instance Contravariant V1 where
   contramap _ x = x `seq` undefined
@@ -177,6 +199,46 @@
   contramap f (R1 ys) = R1 (contramap f ys)
 #endif
 
+instance Contravariant m => Contravariant (ErrorT e m) where
+  contramap f = ErrorT . contramap (fmap f) . runErrorT
+
+instance Contravariant m => Contravariant (ExceptT e m) where
+  contramap f = ExceptT . contramap (fmap f) . runExceptT
+
+instance Contravariant f => Contravariant (IdentityT f) where
+  contramap f = IdentityT . contramap f . runIdentityT
+
+instance Contravariant m => Contravariant (ListT m) where
+  contramap f = ListT . contramap (fmap f) . runListT
+
+instance Contravariant m => Contravariant (MaybeT m) where
+  contramap f = MaybeT . contramap (fmap f) . runMaybeT
+
+instance Contravariant m => Contravariant (Lazy.RWST r w s m) where
+  contramap f m = Lazy.RWST $ \r s ->
+    contramap (\ ~(a, s', w) -> (f a, s', w)) $ Lazy.runRWST m r s
+
+instance Contravariant m => Contravariant (Strict.RWST r w s m) where
+  contramap f m = Strict.RWST $ \r s ->
+    contramap (\ (a, s', w) -> (f a, s', w)) $ Strict.runRWST m r s
+
+instance Contravariant m => Contravariant (ReaderT r m) where
+  contramap f = ReaderT . fmap (contramap f) . runReaderT
+
+instance Contravariant m => Contravariant (Lazy.StateT s m) where
+  contramap f m = Lazy.StateT $ \s ->
+    contramap (\ ~(a, s') -> (f a, s')) $ Lazy.runStateT m s
+
+instance Contravariant m => Contravariant (Strict.StateT s m) where
+  contramap f m = Strict.StateT $ \s ->
+    contramap (\ (a, s') -> (f a, s')) $ Strict.runStateT m s
+
+instance Contravariant m => Contravariant (Lazy.WriterT w m) where
+  contramap f = Lazy.mapWriterT $ contramap $ \ ~(a, w) -> (f a, w)
+
+instance Contravariant m => Contravariant (Strict.WriterT w m) where
+  contramap f = Strict.mapWriterT $ contramap $ \ (a, w) -> (f a, w)
+
 instance (Contravariant f, Contravariant g) => Contravariant (Sum f g) where
   contramap f (InL xs) = InL (contramap f xs)
   contramap f (InR ys) = InR (contramap f ys)


Reply via email to