Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-time-compat for openSUSE:Factory 
checked in at 2021-06-01 10:38:58
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-time-compat (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-time-compat.new.1898 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-time-compat"

Tue Jun  1 10:38:58 2021 rev:10 rq:896202 version:1.9.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-time-compat/ghc-time-compat.changes  
2021-03-10 08:57:45.218919846 +0100
+++ 
/work/SRC/openSUSE:Factory/.ghc-time-compat.new.1898/ghc-time-compat.changes    
    2021-06-01 10:40:35.577132903 +0200
@@ -1,0 +2,11 @@
+Thu May 20 17:32:27 UTC 2021 - [email protected]
+
+- Update time-compat to version 1.9.6.
+  # 1.9.6
+
+  - Move `Hashable` instance here from `hashable-time` package.
+    Note: `ZonedTime` instance is dropped, as `ZonedTime` doesn't have `Eq`
+    instance.
+  - Drop GHC-7.0 and GHC-7.2 support.
+
+-------------------------------------------------------------------

Old:
----
  time-compat-1.9.5.tar.gz
  time-compat.cabal

New:
----
  time-compat-1.9.6.tar.gz

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

Other differences:
------------------
++++++ ghc-time-compat.spec ++++++
--- /var/tmp/diff_new_pack.kUviZl/_old  2021-06-01 10:40:35.973133576 +0200
+++ /var/tmp/diff_new_pack.kUviZl/_new  2021-06-01 10:40:35.977133584 +0200
@@ -19,16 +19,16 @@
 %global pkg_name time-compat
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        1.9.5
+Version:        1.9.6
 Release:        0
 Summary:        Compatibility package for time
 License:        BSD-3-Clause
 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-deepseq-devel
+BuildRequires:  ghc-hashable-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-time-devel
 ExcludeArch:    %{ix86}
@@ -65,7 +65,6 @@
 
 %prep
 %autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build

++++++ time-compat-1.9.5.tar.gz -> time-compat-1.9.6.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/CHANGELOG.md 
new/time-compat-1.9.6/CHANGELOG.md
--- old/time-compat-1.9.5/CHANGELOG.md  2001-09-09 03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/CHANGELOG.md  2001-09-09 03:46:40.000000000 +0200
@@ -1,3 +1,10 @@
+# 1.9.6
+
+- Move `Hashable` instance here from `hashable-time` package.
+  Note: `ZonedTime` instance is dropped, as `ZonedTime` doesn't have `Eq`
+  instance.
+- Drop GHC-7.0 and GHC-7.2 support.
+
 # 1.9.5
 
 - Support `time-1.11.1`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/src/Data/Time/Calendar/Compat.hs 
new/time-compat-1.9.6/src/Data/Time/Calendar/Compat.hs
--- old/time-compat-1.9.5/src/Data/Time/Calendar/Compat.hs      2001-09-09 
03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/Calendar/Compat.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -61,7 +61,7 @@
 -- CalendarDiffTime
 -------------------------------------------------------------------------------
 
-#if MIN_VERSION_time(1,9,0) && !MIN_VERSION_base(1,9,2)
+#if MIN_VERSION_time(1,9,0) && !MIN_VERSION_time(1,9,2)
 deriving instance Typeable CalendarDiffDays
 deriving instance Data CalendarDiffDays
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/time-compat-1.9.5/src/Data/Time/Calendar/Month/Compat.hs 
new/time-compat-1.9.6/src/Data/Time/Calendar/Month/Compat.hs
--- old/time-compat-1.9.5/src/Data/Time/Calendar/Month/Compat.hs        
2001-09-09 03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/Calendar/Month/Compat.hs        
2001-09-09 03:46:40.000000000 +0200
@@ -60,6 +60,7 @@
 import Text.ParserCombinators.ReadP
 import Control.DeepSeq (NFData (..))
 import Data.Ix (Ix (..))
+import Data.Hashable (Hashable (..))
 
 -- | An absolute count of common calendar months.
 -- Number is equal to @(year * 12) + (monthOfYear - 1)@.
@@ -68,6 +69,9 @@
 instance NFData Month where
     rnf (MkMonth m) = rnf m
 
+instance Hashable Month where
+    hashWithSalt salt (MkMonth x) = hashWithSalt salt x
+
 instance Enum Month where
     succ (MkMonth a) = MkMonth (succ a)
     pred (MkMonth a) = MkMonth (pred a)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/time-compat-1.9.5/src/Data/Time/Calendar/Quarter/Compat.hs 
new/time-compat-1.9.6/src/Data/Time/Calendar/Quarter/Compat.hs
--- old/time-compat-1.9.5/src/Data/Time/Calendar/Quarter/Compat.hs      
2001-09-09 03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/Calendar/Quarter/Compat.hs      
2001-09-09 03:46:40.000000000 +0200
@@ -40,6 +40,7 @@
 import Text.ParserCombinators.ReadP    (char)
 import Control.DeepSeq (NFData (..))
 import Data.Ix (Ix (..))
+import Data.Hashable (Hashable (..))
 
 import Data.Time.Calendar
 import Data.Time.Calendar.Types
@@ -55,6 +56,9 @@
     rnf Q3 = ()
     rnf Q4 = ()
 
+instance Hashable QuarterOfYear where
+    hashWithSalt salt = hashWithSalt salt . fromEnum
+
 -- | maps Q1..Q4 to 1..4
 instance Enum QuarterOfYear where
     toEnum i =
@@ -79,6 +83,9 @@
 instance NFData Quarter where
     rnf (MkQuarter m) = rnf m
 
+instance Hashable Quarter where
+    hashWithSalt salt (MkQuarter x) = hashWithSalt salt x
+
 instance Enum Quarter where
     succ (MkQuarter a) = MkQuarter (succ a)
     pred (MkQuarter a) = MkQuarter (pred a)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/time-compat-1.9.5/src/Data/Time/Calendar/WeekDate/Compat.hs 
new/time-compat-1.9.6/src/Data/Time/Calendar/WeekDate/Compat.hs
--- old/time-compat-1.9.5/src/Data/Time/Calendar/WeekDate/Compat.hs     
2001-09-09 03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/Calendar/WeekDate/Compat.hs     
2001-09-09 03:46:40.000000000 +0200
@@ -41,6 +41,7 @@
 #endif
 
 import Control.DeepSeq (NFData (..))
+import Data.Hashable (Hashable (..))
 
 
 #if !MIN_VERSION_time(1,11,0)
@@ -136,6 +137,9 @@
 instance NFData DayOfWeek where
     rnf !_ = ()
 
+instance Hashable DayOfWeek where
+    hashWithSalt salt = hashWithSalt salt . fromEnum
+
 -- | \"Circular\", so for example @[Tuesday ..]@ gives an endless sequence.
 -- Also: 'fromEnum' gives [1 .. 7] for [Monday .. Sunday], and 'toEnum' 
performs mod 7 to give a cycle of days.
 instance Enum DayOfWeek where
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/src/Data/Time/Clock/Compat.hs 
new/time-compat-1.9.6/src/Data/Time/Clock/Compat.hs
--- old/time-compat-1.9.5/src/Data/Time/Clock/Compat.hs 2001-09-09 
03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/Clock/Compat.hs 2001-09-09 
03:46:40.000000000 +0200
@@ -66,9 +66,5 @@
 #if !MIN_VERSION_time(1,6,0)
 -- | Get the number of picoseconds in a 'DiffTime'.
 diffTimeToPicoseconds :: DiffTime -> Integer
-#if MIN_VERSION_time(1,4,0)
 diffTimeToPicoseconds = truncate . (1000000000000 *)
-#else
-diffTimeToPicoseconds = truncate . toRational . (1000000000000 *)
-#endif
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/src/Data/Time/LocalTime/Compat.hs 
new/time-compat-1.9.6/src/Data/Time/LocalTime/Compat.hs
--- old/time-compat-1.9.5/src/Data/Time/LocalTime/Compat.hs     2001-09-09 
03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/LocalTime/Compat.hs     2001-09-09 
03:46:40.000000000 +0200
@@ -79,7 +79,7 @@
 -- CalendarDiffTime
 -------------------------------------------------------------------------------
 
-#if MIN_VERSION_time(1,9,0) && !MIN_VERSION_base(1,9,2)
+#if MIN_VERSION_time(1,9,0) && !MIN_VERSION_time(1,9,2)
 deriving instance Typeable CalendarDiffTime
 deriving instance Data CalendarDiffTime
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/src/Data/Time/Orphans.hs 
new/time-compat-1.9.6/src/Data/Time/Orphans.hs
--- old/time-compat-1.9.5/src/Data/Time/Orphans.hs      2001-09-09 
03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/src/Data/Time/Orphans.hs      2001-09-09 
03:46:40.000000000 +0200
@@ -13,6 +13,13 @@
 import Data.Time.Clock
 import Data.Time.Clock.TAI
 import Data.Time.Format
+import Data.Hashable (Hashable (..))
+
+#if MIN_VERSION_time(1,5,0)
+import Data.Time.Format (TimeLocale (..))
+#else
+import System.Locale (TimeLocale (..))
+#endif
 
 #if MIN_VERSION_time(1,8,0)
 import Data.Time.Clock.System
@@ -31,38 +38,6 @@
 import Data.Time.Calendar.Quarter
 #endif
 
-#if !MIN_VERSION_time(1,4,0)
-instance NFData Day where
-    rnf (ModifiedJulianDay d) = rnf d
-
-instance NFData UniversalTime where
-    rnf (ModJulianDate d) = rnf d
-
-instance NFData DiffTime where
-    rnf d = d `seq` ()
-
-instance NFData AbsoluteTime where
-    rnf d = d `seq` ()
-
-instance NFData UTCTime where
-    rnf (UTCTime d t) = rnf d `seq` rnf t
-
-instance NFData NominalDiffTime where
-    rnf d = d `seq` ()
-
-instance NFData LocalTime where
-    rnf (LocalTime d tod) = rnf d `seq` rnf tod
-
-instance NFData ZonedTime where
-    rnf (ZonedTime lt tz) = rnf lt `seq` rnf tz
-
-instance NFData TimeOfDay where
-    rnf (TimeOfDay h m s) = rnf h `seq` rnf m `seq` rnf s
-
-instance NFData TimeZone where
-    rnf (TimeZone a b c) = rnf a `seq` rnf b `seq` rnf c
-#endif
-
 #if !MIN_VERSION_time(1,6,0)
 instance ParseTime UniversalTime where
     -- substituteTimeSpecifier _ = timeSubstituteTimeSpecifier
@@ -173,3 +148,62 @@
     inRange (MkQuarter a, MkQuarter b) (MkQuarter c) = inRange (a, b) c
     rangeSize (MkQuarter a, MkQuarter b) = rangeSize (a, b)
 #endif
+
+-------------------------------------------------------------------------------
+-- Hashable
+-------------------------------------------------------------------------------
+
+instance Hashable UniversalTime where
+    hashWithSalt salt = hashWithSalt salt . getModJulianDate
+
+instance Hashable DiffTime where
+    hashWithSalt salt = hashWithSalt salt . toRational
+
+instance Hashable UTCTime where
+    hashWithSalt salt (UTCTime d dt) =
+        salt `hashWithSalt` d `hashWithSalt` dt
+
+instance Hashable NominalDiffTime where
+    hashWithSalt salt = hashWithSalt salt . toRational
+
+instance Hashable Day where
+    hashWithSalt salt (ModifiedJulianDay d) = hashWithSalt salt d
+
+instance Hashable TimeZone where
+    hashWithSalt salt (TimeZone m s n) =
+        salt `hashWithSalt` m `hashWithSalt` s `hashWithSalt` n
+
+instance Hashable TimeOfDay where
+    hashWithSalt salt (TimeOfDay h m s) =
+        salt `hashWithSalt` h `hashWithSalt` m `hashWithSalt` s
+
+instance Hashable LocalTime where
+    hashWithSalt salt (LocalTime d tod) =
+        salt `hashWithSalt` d `hashWithSalt` tod
+
+instance Hashable TimeLocale where
+    hashWithSalt salt (TimeLocale a b c d e f g h) =
+      salt `hashWithSalt` a
+           `hashWithSalt` b
+           `hashWithSalt` c
+           `hashWithSalt` d
+           `hashWithSalt` e
+           `hashWithSalt` f
+           `hashWithSalt` g
+           `hashWithSalt` h
+
+#if MIN_VERSION_time(1,9,0)
+instance Hashable DayOfWeek where
+    hashWithSalt salt = hashWithSalt salt . fromEnum
+#endif
+
+#if MIN_VERSION_time(1,11,0)
+instance Hashable Month where
+    hashWithSalt salt (MkMonth x) = hashWithSalt salt x
+
+instance Hashable Quarter where
+    hashWithSalt salt (MkQuarter x) = hashWithSalt salt x
+
+instance Hashable QuarterOfYear where
+    hashWithSalt salt = hashWithSalt salt . fromEnum
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/test-instances/Test.hs 
new/time-compat-1.9.6/test-instances/Test.hs
--- old/time-compat-1.9.5/test-instances/Test.hs        2001-09-09 
03:46:40.000000000 +0200
+++ new/time-compat-1.9.6/test-instances/Test.hs        2001-09-09 
03:46:40.000000000 +0200
@@ -1,6 +1,7 @@
 module Main where
 
 import Control.DeepSeq (NFData (rnf), force)
+import Data.Hashable (Hashable)
 
 import Data.Time.Calendar.Compat
 import Data.Time.Calendar.Month.Compat
@@ -103,3 +104,23 @@
   where
     test :: Enum t => t -> ()
     test _ = ()
+
+_HashableInstances :: [()]
+_HashableInstances =
+    [ test (undefined :: TimeLocale)
+    , test (undefined :: LocalTime)
+    , test (undefined :: TimeOfDay)
+    , test (undefined :: TimeZone)
+    , test (undefined :: UniversalTime)
+    , test (undefined :: UTCTime)
+    , test (undefined :: NominalDiffTime)
+    , test (undefined :: DiffTime)
+    , test (undefined :: DayOfWeek)
+    , test (undefined :: Day)
+    , test (undefined :: QuarterOfYear)
+    , test (undefined :: Quarter)
+    , test (undefined :: Month)
+    ]
+  where
+    test :: Hashable t => t -> ()
+    test _ = ()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/time-compat-1.9.5/time-compat.cabal 
new/time-compat-1.9.6/time-compat.cabal
--- old/time-compat-1.9.5/time-compat.cabal     2001-09-09 03:46:40.000000000 
+0200
+++ new/time-compat-1.9.6/time-compat.cabal     2001-09-09 03:46:40.000000000 
+0200
@@ -1,6 +1,6 @@
 cabal-version:      1.12
 name:               time-compat
-version:            1.9.5
+version:            1.9.6
 synopsis:           Compatibility package for time
 description:
   This packages tries to compat as much of @time@ features as possible.
@@ -23,9 +23,7 @@
 build-type:         Simple
 extra-source-files: CHANGELOG.md
 tested-with:
-  GHC ==7.0.4
-   || ==7.2.2
-   || ==7.4.2
+  GHC ==7.4.2
    || ==7.6.3
    || ==7.8.4
    || ==7.10.3
@@ -34,7 +32,8 @@
    || ==8.4.4
    || ==8.6.5
    || ==8.8.4
-   || ==8.10.2
+   || ==8.10.4
+   || ==9.0.1
 
 source-repository head
   type:     git
@@ -54,15 +53,16 @@
     default-extensions: Trustworthy
 
   build-depends:
-      base          >=4.3     && <4.15
-    , base-orphans  >=0.8.1   && <0.9
+      base          >=4.5     && <4.16
+    , base-orphans  >=0.8.4   && <0.9
     , deepseq       >=1.3.0.0 && <1.4 || >=1.4.1.1 && <1.5
-    , time          >=1.2     && <1.3 || >=1.4 && <1.7 || >=1.8 && <1.9 || 
>=1.9.2 && <1.9.4 || >=1.10 && <1.10.1 || >=1.11 && <1.11.2
+    , time          >=1.4     && <1.7 || >=1.8 && <1.9 || >=1.9.2 && <1.9.4 || 
>=1.10 && <1.10.1 || >=1.11 && <1.11.2
+    , hashable      >=1.3.2.0 && <1.4
 
   if flag(old-locale)
     build-depends:
         old-locale  >=1.0.0.2 && <1.1
-      , time        >=0       && <1.5
+      , time        >=1.4     && <1.5
 
   else
     build-depends: time >=1.5
@@ -105,6 +105,7 @@
       base
     , deepseq
     , HUnit        >=1.3.1 && <1.3.2 || >=1.6.0.0 && <1.7
+    , hashable     >=1.3.1.0 && <1.4
     , time-compat
 
 -- This test-suite is from time library

Reply via email to