Hello community,

here is the log from the commit of package ghc-these for openSUSE:Factory 
checked in at 2020-07-21 15:50:28
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-these (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-these.new.3592 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-these"

Tue Jul 21 15:50:28 2020 rev:2 rq:822046 version:1.1.1.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-these/ghc-these.changes      2020-06-19 
17:04:49.216736087 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-these.new.3592/ghc-these.changes    
2020-07-21 15:53:16.156506254 +0200
@@ -1,0 +2,17 @@
+Wed Jul 15 02:00:25 UTC 2020 - [email protected]
+
+- Update these to version 1.1.1.1.
+  # 1.1.1.1
+
+  - Workaround GCC-4 C-preprocessor bug
+
+-------------------------------------------------------------------
+Fri Jul 10 02:00:24 UTC 2020 - [email protected]
+
+- Update these to version 1.1.1.
+  # 1.1.1
+
+  - These doesn't depend on `base-compat` anymore
+  - Add `NFData1/2`, `Hashable1/2`, `Eq1/2` ... instances
+
+-------------------------------------------------------------------

Old:
----
  these-1.1.tar.gz

New:
----
  these-1.1.1.1.tar.gz

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

Other differences:
------------------
++++++ ghc-these.spec ++++++
--- /var/tmp/diff_new_pack.BSLkST/_old  2020-07-21 15:53:18.772509435 +0200
+++ /var/tmp/diff_new_pack.BSLkST/_new  2020-07-21 15:53:18.776509440 +0200
@@ -18,7 +18,7 @@
 
 %global pkg_name these
 Name:           ghc-%{pkg_name}
-Version:        1.1
+Version:        1.1.1.1
 Release:        0
 Summary:        An either-or-both data type
 License:        BSD-3-Clause
@@ -26,7 +26,6 @@
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-assoc-devel
-BuildRequires:  ghc-base-compat-devel
 BuildRequires:  ghc-binary-devel
 BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-hashable-devel

++++++ these-1.1.tar.gz -> these-1.1.1.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/these-1.1/CHANGELOG.md new/these-1.1.1.1/CHANGELOG.md
--- old/these-1.1/CHANGELOG.md  2001-09-09 03:46:40.000000000 +0200
+++ new/these-1.1.1.1/CHANGELOG.md      2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,12 @@
+# 1.1.1.1
+
+- Workaround GCC-4 C-preprocessor bug
+
+# 1.1.1
+
+- These doesn't depend on `base-compat` anymore
+- Add `NFData1/2`, `Hashable1/2`, `Eq1/2` ... instances
+
 # 1.1
 
 - Reverse dependency with `aeson`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/these-1.1/src/Data/Functor/These.hs 
new/these-1.1.1.1/src/Data/Functor/These.hs
--- old/these-1.1/src/Data/Functor/These.hs     2001-09-09 03:46:40.000000000 
+0200
+++ new/these-1.1.1.1/src/Data/Functor/These.hs 2001-09-09 03:46:40.000000000 
+0200
@@ -1,11 +1,16 @@
 {-# LANGUAGE CPP                #-}
+{-# LANGUAGE DeriveDataTypeable #-}
+{-# LANGUAGE DeriveFoldable     #-}
+{-# LANGUAGE DeriveFunctor      #-}
+{-# LANGUAGE DeriveGeneric      #-}
+{-# LANGUAGE DeriveTraversable  #-}
 {-# LANGUAGE OverloadedStrings  #-}
-{-# LANGUAGE Trustworthy        #-}
+{-# LANGUAGE Safe               #-}
 
 #if MIN_VERSION_base(4,9,0)
 #define LIFTED_FUNCTOR_CLASSES 1
 #else
-#if MIN_VERSION_transformers(0,5,0)
+#if MIN_VERSION_transformers (0,5,0)
 #define LIFTED_FUNCTOR_CLASSES 1
 #else
 #if MIN_VERSION_transformers_compat(0,5,0) && !MIN_VERSION_transformers(0,4,0)
@@ -13,23 +18,21 @@
 #endif
 #endif
 #endif
-
-{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE DeriveFoldable     #-}
-{-# LANGUAGE DeriveFunctor      #-}
-{-# LANGUAGE DeriveGeneric      #-}
-{-# LANGUAGE DeriveTraversable  #-}
 module Data.Functor.These (
     These1 (..),
     ) where
 
-import Prelude ()
-import Prelude.Compat
-
+import Data.Foldable        (Foldable)
 import Data.Functor.Classes
        (Eq1 (..), Ord1 (..), Read1 (..), Show1 (..), compare1, eq1, readsPrec1,
        showsPrec1)
+import Data.Monoid          (Monoid (..))
+import Data.Traversable     (Traversable)
 import GHC.Generics         (Generic)
+import Prelude
+       (Bool (..), Eq (..), Functor, Ord (..), Ordering (..), Read (..),
+       Show (..), lex, readParen, return, seq, showChar, showParen, showString,
+       ($), (&&), (.))
 
 
 #if MIN_VERSION_deepseq(1,4,3)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/these-1.1/src/Data/These/Combinators.hs 
new/these-1.1.1.1/src/Data/These/Combinators.hs
--- old/these-1.1/src/Data/These/Combinators.hs 2001-09-09 03:46:40.000000000 
+0200
+++ new/these-1.1.1.1/src/Data/These/Combinators.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -80,13 +80,12 @@
     mapThese,
     ) where
 
-import Prelude ()
-import Prelude.Compat
-
-import Data.Bifunctor     (bimap, first, second)
-import Data.Bitraversable (bitraverse)
-import Data.Maybe         (isJust, mapMaybe)
+import Control.Applicative (Applicative (..))
+import Data.Bifunctor      (bimap, first, second)
+import Data.Bitraversable  (bitraverse)
+import Data.Maybe          (isJust, mapMaybe)
 import Data.These
+import Prelude             (Bool (..), Maybe (..), curry, uncurry, (.))
 
 #ifdef MIN_VERSION_assoc
 import Data.Bifunctor.Assoc (assoc, unassoc)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/these-1.1/src/Data/These.hs 
new/these-1.1.1.1/src/Data/These.hs
--- old/these-1.1/src/Data/These.hs     2001-09-09 03:46:40.000000000 +0200
+++ new/these-1.1.1.1/src/Data/These.hs 2001-09-09 03:46:40.000000000 +0200
@@ -3,7 +3,20 @@
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE DeriveGeneric      #-}
 {-# LANGUAGE OverloadedStrings  #-}
-{-# LANGUAGE Trustworthy        #-}
+{-# LANGUAGE Safe               #-}
+
+#if MIN_VERSION_base(4,9,0)
+#define LIFTED_FUNCTOR_CLASSES 1
+#else
+#if MIN_VERSION_transformers(0,5,0)
+#define LIFTED_FUNCTOR_CLASSES 1
+#else
+#if MIN_VERSION_transformers_compat(0,5,0) && !MIN_VERSION_transformers(0,4,0)
+#define LIFTED_FUNCTOR_CLASSES 1
+#endif
+#endif
+#endif
+
 module Data.These (
       These(..)
 
@@ -27,20 +40,30 @@
     , undistrPairThese
     ) where
 
-import Prelude ()
-import Prelude.Compat
+import Control.Applicative  (Applicative (..), (<$>))
+import Control.DeepSeq      (NFData (..))
+import Data.Bifoldable      (Bifoldable (..))
+import Data.Bifunctor       (Bifunctor (..))
+import Data.Binary          (Binary (..))
+import Data.Bitraversable   (Bitraversable (..))
+import Data.Data            (Data, Typeable)
+import Data.Either          (partitionEithers)
+import Data.Foldable        (Foldable (..))
+import Data.Hashable        (Hashable (..))
+import Data.Hashable.Lifted (Hashable1 (..), Hashable2 (..))
+import Data.List.NonEmpty   (NonEmpty (..))
+import Data.Monoid          (Monoid (..))
+import Data.Semigroup       (Semigroup (..))
+import Data.Traversable     (Traversable (..))
+import GHC.Generics         (Generic)
+import Prelude
+       (Bool (..), Either (..), Eq (..), Functor (..), Int, Monad (..),
+       Ord (..), Ordering (..), Read (..), Show (..), fail, id, lex, readParen,
+       seq, showParen, showString, ($), (&&), (.))
 
-import Control.DeepSeq    (NFData (..))
-import Data.Bifoldable    (Bifoldable (..))
-import Data.Bifunctor     (Bifunctor (..))
-import Data.Binary        (Binary (..))
-import Data.Bitraversable (Bitraversable (..))
-import Data.Data          (Data, Typeable)
-import Data.Either        (partitionEithers)
-import Data.Hashable      (Hashable (..))
-import Data.List.NonEmpty (NonEmpty (..))
-import Data.Semigroup     (Semigroup (..))
-import GHC.Generics       (Generic)
+#if MIN_VERSION_deepseq(1,4,3)
+import Control.DeepSeq (NFData1 (..), NFData2 (..))
+#endif
 
 #if __GLASGOW_HASKELL__ >= 706
 import GHC.Generics (Generic1)
@@ -51,6 +74,14 @@
 import Data.Bifunctor.Swap  (Swap (..))
 #endif
 
+#ifdef LIFTED_FUNCTOR_CLASSES
+import Data.Functor.Classes
+       (Eq1 (..), Eq2 (..), Ord1 (..), Ord2 (..), Read1 (..), Read2 (..),
+       Show1 (..), Show2 (..))
+#else
+import Data.Functor.Classes (Eq1 (..), Ord1 (..), Read1 (..), Show1 (..))
+#endif
+
 -- $setup
 -- >>> import Control.Lens
 
@@ -250,7 +281,88 @@
                           This  b   -> This  (a <> b)
                           That    y -> These a y
                           These b y -> These (a <> b) y
-instance (Hashable a, Hashable b) => Hashable (These a b)
+
+-------------------------------------------------------------------------------
+-- Data.Functor.Classes
+-------------------------------------------------------------------------------
+
+#ifdef LIFTED_FUNCTOR_CLASSES
+-- | @since 1.1.1
+instance Eq2 These where
+  liftEq2 f _ (This a)    (This a')     = f a a'
+  liftEq2 _ g (That b)    (That b')     = g b b'
+  liftEq2 f g (These a b) (These a' b') = f a a' && g b b'
+  liftEq2 _ _ _           _             = False
+
+-- | @since 1.1.1
+instance Eq a => Eq1 (These a) where
+  liftEq = liftEq2 (==)
+
+-- | @since 1.1.1
+instance Ord2 These where
+  liftCompare2 f _ (This a)    (This a')     = f a a'
+  liftCompare2 _ _ (This _)    _             = LT
+  liftCompare2 _ _ _           (This _)      = GT
+  liftCompare2 _ g (That b)    (That b')     = g b b'
+  liftCompare2 _ _ (That _)    _             = LT
+  liftCompare2 _ _ _           (That _)      = GT
+  liftCompare2 f g (These a b) (These a' b') = f a a' `mappend` g b b'
+
+-- | @since 1.1.1
+instance Ord a => Ord1 (These a) where
+  liftCompare = liftCompare2 compare
+
+-- | @since 1.1.1
+instance Show a => Show1 (These a) where
+  liftShowsPrec = liftShowsPrec2 showsPrec showList
+
+-- | @since 1.1.1
+instance Show2 These where
+  liftShowsPrec2 sa _ _sb _ d (This a) = showParen (d > 10)
+    $ showString "This "
+    . sa 11 a
+  liftShowsPrec2 _sa _ sb _ d (That b) = showParen (d > 10)
+    $ showString "That "
+    . sb 11 b
+  liftShowsPrec2 sa _ sb _ d (These a b) = showParen (d > 10)
+    $ showString "These "
+    . sa 11 a
+    . showString " "
+    . sb 11 b
+
+-- | @since 1.1.1
+instance Read2 These where
+  liftReadsPrec2 ra _ rb _ d = readParen (d > 10) $ \s -> cons s
+    where
+      cons s0 = do
+        (ident, s1) <- lex s0
+        case ident of
+            "This" ->  do
+                (a, s2) <- ra 11 s1
+                return (This a, s2)
+            "That" ->  do
+                (b, s2) <- rb 11 s1
+                return (That b, s2)
+            "These" -> do
+                (a, s2) <- ra 11 s1
+                (b, s3) <- rb 11 s2
+                return (These a b, s3)
+            _ -> []
+
+-- | @since 1.1.1
+instance Read a => Read1 (These a) where
+  liftReadsPrec = liftReadsPrec2 readsPrec readList
+
+#else
+-- | @since 1.1.1
+instance Eq a   => Eq1   (These a) where eq1        = (==)
+-- | @since 1.1.1
+instance Ord a  => Ord1  (These a) where compare1   = compare
+-- | @since 1.1.1
+instance Show a => Show1 (These a) where showsPrec1 = showsPrec
+-- | @since 1.1.1
+instance Read a => Read1 (These a) where readsPrec1 = readsPrec
+#endif
 
 -------------------------------------------------------------------------------
 -- assoc
@@ -292,6 +404,20 @@
     rnf (That b)    = rnf b
     rnf (These a b) = rnf a `seq` rnf b
 
+#if MIN_VERSION_deepseq(1,4,3)
+-- | @since 1.1.1
+instance NFData a => NFData1 (These a) where
+    liftRnf _rnfB (This a)    = rnf a
+    liftRnf  rnfB (That b)    = rnfB b
+    liftRnf  rnfB (These a b) = rnf a `seq` rnfB b
+
+-- | @since 1.1.1
+instance NFData2 These where
+    liftRnf2  rnfA _rnfB (This a)    = rnfA a
+    liftRnf2 _rnfA  rnfB (That b)    = rnfB b
+    liftRnf2  rnfA  rnfB (These a b) = rnfA a `seq` rnfB b
+#endif
+
 -------------------------------------------------------------------------------
 -- binary
 -------------------------------------------------------------------------------
@@ -309,3 +435,33 @@
             1 -> That <$> get
             2 -> These <$> get <*> get
             _ -> fail "Invalid These index"
+
+-------------------------------------------------------------------------------
+-- hashable
+-------------------------------------------------------------------------------
+
+instance (Hashable a, Hashable b) => Hashable (These a b) where
+    hashWithSalt salt (This a) =
+        salt `hashWithSalt` (0 :: Int) `hashWithSalt` a
+    hashWithSalt salt (That b) =
+        salt `hashWithSalt` (1 :: Int) `hashWithSalt` b
+    hashWithSalt salt (These a b) =
+        salt `hashWithSalt` (2 :: Int) `hashWithSalt` a `hashWithSalt` b
+
+-- | @since 1.1.1
+instance Hashable a => Hashable1 (These a) where
+    liftHashWithSalt _hashB salt (This a) =
+        salt `hashWithSalt` (0 :: Int) `hashWithSalt` a
+    liftHashWithSalt  hashB salt (That b) =
+        (salt `hashWithSalt` (1 :: Int)) `hashB` b
+    liftHashWithSalt  hashB salt (These a b) =
+        (salt `hashWithSalt` (2 :: Int) `hashWithSalt` a) `hashB` b
+
+-- | @since 1.1.1
+instance Hashable2 These where
+    liftHashWithSalt2  hashA _hashB salt (This a) =
+        (salt `hashWithSalt` (0 :: Int)) `hashA` a
+    liftHashWithSalt2 _hashA  hashB salt (That b) =
+        (salt `hashWithSalt` (1 :: Int)) `hashB` b
+    liftHashWithSalt2  hashA  hashB salt (These a b) =
+        (salt `hashWithSalt` (2 :: Int)) `hashA` a `hashB` b
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/these-1.1/these.cabal new/these-1.1.1.1/these.cabal
--- old/these-1.1/these.cabal   2001-09-09 03:46:40.000000000 +0200
+++ new/these-1.1.1.1/these.cabal       2001-09-09 03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
 cabal-version:      >=1.10
 name:               these
-version:            1.1
+version:            1.1.1.1
 synopsis:           An either-or-both data type.
 homepage:           https://github.com/isomorphism/these
 license:            BSD3
@@ -72,9 +72,7 @@
     , deepseq  >=1.3.0.0 && <1.5
 
   -- other dependencies
-  build-depends:
-      base-compat  >=0.10.5  && <0.12
-    , hashable     >=1.2.7.0 && <1.4
+  build-depends:    hashable >=1.2.7.0 && <1.4
 
   if impl(ghc <7.5)
     build-depends: ghc-prim


Reply via email to