Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-base-compat for openSUSE:Factory
checked in at 2023-10-18 21:25:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-base-compat (Old)
and /work/SRC/openSUSE:Factory/.ghc-base-compat.new.31755 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-base-compat"
Wed Oct 18 21:25:48 2023 rev:23 rq:1118466 version:0.13.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-base-compat/ghc-base-compat.changes
2023-06-22 23:25:38.385712653 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-base-compat.new.31755/ghc-base-compat.changes
2023-10-18 21:26:01.257376930 +0200
@@ -1,0 +2,9 @@
+Wed Oct 11 11:37:07 UTC 2023 - Peter Simons <[email protected]>
+
+- Update base-compat to version 0.13.1.
+ Upstream has edited the change log file since the last release in
+ a non-trivial way, i.e. they did more than just add a new entry
+ at the top. You can review the file at:
+ http://hackage.haskell.org/package/base-compat-0.13.1/src/CHANGES.markdown
+
+-------------------------------------------------------------------
Old:
----
base-compat-0.13.0.tar.gz
New:
----
base-compat-0.13.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-base-compat.spec ++++++
--- /var/tmp/diff_new_pack.yotf66/_old 2023-10-18 21:26:01.853398521 +0200
+++ /var/tmp/diff_new_pack.yotf66/_new 2023-10-18 21:26:01.853398521 +0200
@@ -19,7 +19,7 @@
%global pkg_name base-compat
%global pkgver %{pkg_name}-%{version}
Name: ghc-%{pkg_name}
-Version: 0.13.0
+Version: 0.13.1
Release: 0
Summary: A compatibility layer for base
License: MIT
++++++ base-compat-0.13.0.tar.gz -> base-compat-0.13.1.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/CHANGES.markdown
new/base-compat-0.13.1/CHANGES.markdown
--- old/base-compat-0.13.0/CHANGES.markdown 2001-09-09 03:46:40.000000000
+0200
+++ new/base-compat-0.13.1/CHANGES.markdown 2001-09-09 03:46:40.000000000
+0200
@@ -1,3 +1,13 @@
+## Changes in 0.13.1 [2023.10.11]
+ - Sync with `base-4.19`/GHC 9.8
+ - Backport `unzip` to `Data.Functor.Compat`
+ - Backport `(!?)` and `unsnoc` to `Data.List.Compat`
+ - Backport `getSolo` to `Data.Tuple.Compat` when building against
+ `ghc-prim-0.8.0` (GHC 9.2) or later. To backport `getSolo` to older versions
+ of GHC, import `Data.Tuple.Compat` from `base-compat-batteries` instead.
+ - Backport `decT` and `hdecT` to `Data.Typeable.Compat`
+ - Backport `decTypeRep` to `Type.Reflection.Compat`
+
## Changes in 0.13.0 [2023.03.10]
- Sync with `base-4.18`/GHC 9.6
- Backport `liftA2` being re-exported from `Prelude.Compat`.
@@ -23,6 +33,11 @@
`base-compat-batteries` instead if you want increase the range of `base`
versions that are supported.
+## Changes in 0.12.3 [2023.07.12]
+ - This coincides with the `base-compat-batteries-0.12.3` release. Refer to the
+ [`base-compat-batteries`
changelog](https://github.com/haskell-compat/base-compat/blob/master/base-compat-batteries/CHANGES.markdown#changes-in-0123-20230712)
+ for more details.
+
## Changes in 0.12.2 [2022.08.11]
- Sync with `base-4.17`/GHC 9.4
- Backport `(.^.)`, `(.>>.)`, `(.<<.)`, `(!>>.)`, `(!<<.)`, `oneBits` to
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/README.markdown
new/base-compat-0.13.1/README.markdown
--- old/base-compat-0.13.0/README.markdown 2001-09-09 03:46:40.000000000
+0200
+++ new/base-compat-0.13.1/README.markdown 2001-09-09 03:46:40.000000000
+0200
@@ -163,6 +163,11 @@
* `minusNaturalMaybe` to `Numeric.Natural.Compat`
* `mapAccumM` and `forAccumM` to `Data.Traversable.Compat`
* `heqT` to `Data.Typeable.Compat`
+ * `unzip` to `Data.Functor.Compat`
+ * `(!?)` and `unsnoc` to `Data.List.Compat`
+ * `getSolo` to `Data.Tuple.Compat`
+ * `decT` and `hdecT` to `Data.Typeable.Compat`
+ * `decTypeRep` to `Type.Reflection.Compat`
## What is not covered
@@ -340,6 +345,7 @@
## Supported versions of GHC/`base`
+ * `ghc-9.8.*` / `base-4.19.*`
* `ghc-9.6.*` / `base-4.18.*`
* `ghc-9.4.*` / `base-4.17.*`
* `ghc-9.2.*` / `base-4.16.*`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/base-compat.cabal
new/base-compat-0.13.1/base-compat.cabal
--- old/base-compat-0.13.0/base-compat.cabal 2001-09-09 03:46:40.000000000
+0200
+++ new/base-compat-0.13.1/base-compat.cabal 2001-09-09 03:46:40.000000000
+0200
@@ -1,5 +1,5 @@
name: base-compat
-version: 0.13.0
+version: 0.13.1
license: MIT
license-file: LICENSE
copyright: (c) 2012-2018 Simon Hengel,
@@ -44,6 +44,23 @@
anything in @base-compat-batteries@, to allow for easier
use in GHCi.
extra-source-files: CHANGES.markdown, README.markdown
+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
+ , GHC == 8.2.2
+ , GHC == 8.4.4
+ , GHC == 8.6.5
+ , GHC == 8.8.4
+ , GHC == 8.10.7
+ , GHC == 9.0.2
+ , GHC == 9.2.7
+ , GHC == 9.4.5
+ , GHC == 9.6.2
+ , GHC == 9.8.1
source-repository head
type: git
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/src/Data/Functor/Compat.hs
new/base-compat-0.13.1/src/Data/Functor/Compat.hs
--- old/base-compat-0.13.0/src/Data/Functor/Compat.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/base-compat-0.13.1/src/Data/Functor/Compat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -5,6 +5,7 @@
, ($>)
, void
, (<&>)
+, unzip
) where
import Data.Functor as Base
@@ -13,6 +14,10 @@
import Data.Function (flip)
#endif
+#if !(MIN_VERSION_base(4,19,0))
+import Data.Tuple (fst, snd)
+#endif
+
#if !(MIN_VERSION_base(4,7,0))
infixl 4 $>
@@ -49,3 +54,11 @@
infixl 1 <&>
#endif
+
+#if !(MIN_VERSION_base(4,19,0))
+-- | Generalization of @Data.List.@'Data.List.unzip'.
+--
+-- /Since: 4.19.0.0/
+unzip :: Functor f => f (a, b) -> (f a, f b)
+unzip xs = (fst <$> xs, snd <$> xs)
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/src/Data/List/Compat.hs
new/base-compat-0.13.1/src/Data/List/Compat.hs
--- old/base-compat-0.13.0/src/Data/List/Compat.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/base-compat-0.13.1/src/Data/List/Compat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -5,6 +5,11 @@
#endif
module Data.List.Compat (
module Base
+#if !(MIN_VERSION_base(4,19,0))
+, (!?)
+, unsnoc
+#endif
+
#if !(MIN_VERSION_base(4,15,0))
, singleton
#endif
@@ -94,6 +99,9 @@
#if !(MIN_VERSION_base(4,11,0))
import GHC.Exts (build)
+#endif
+
+#if !(MIN_VERSION_base(4,19,0))
import Prelude.Compat hiding (foldr, null)
#endif
@@ -251,3 +259,65 @@
singleton :: a -> [a]
singleton x = [x]
#endif
+
+#if !(MIN_VERSION_base(4,19,0))
+infixl 9 !?
+-- | List index (subscript) operator, starting from 0. Returns 'Nothing'
+-- if the index is out of bounds
+--
+-- >>> ['a', 'b', 'c'] !? 0
+-- Just 'a'
+-- >>> ['a', 'b', 'c'] !? 2
+-- Just 'c'
+-- >>> ['a', 'b', 'c'] !? 3
+-- Nothing
+-- >>> ['a', 'b', 'c'] !? (-1)
+-- Nothing
+--
+-- This is the total variant of the partial '!!' operator.
+--
+-- WARNING: This function takes linear time in the index.
+(!?) :: [a] -> Int -> Maybe a
+
+{-# INLINABLE (!?) #-}
+xs !? n
+ | n < 0 = Nothing
+ | otherwise = foldr (\x r k -> case k of
+ 0 -> Just x
+ _ -> r (k-1)) (const Nothing) xs n
+
+-- | \(\mathcal{O}(n)\). Decompose a list into 'init' and 'last'.
+--
+-- * If the list is empty, returns 'Nothing'.
+-- * If the list is non-empty, returns @'Just' (xs, x)@,
+-- where @xs@ is the 'init'ial part of the list and @x@ is its 'last' element.
+--
+-- /Since: 4.19.0.0/
+--
+-- >>> unsnoc []
+-- Nothing
+-- >>> unsnoc [1]
+-- Just ([],1)
+-- >>> unsnoc [1, 2, 3]
+-- Just ([1,2],3)
+--
+-- Laziness:
+--
+-- >>> fst <$> unsnoc [undefined]
+-- Just []
+-- >>> head . fst <$> unsnoc (1 : undefined)
+-- Just *** Exception: Prelude.undefined
+-- >>> head . fst <$> unsnoc (1 : 2 : undefined)
+-- Just 1
+--
+-- 'unsnoc' is dual to 'uncons': for a finite list @xs@
+--
+-- > unsnoc xs = (\(hd, tl) -> (reverse tl, hd)) <$> uncons (reverse xs)
+--
+unsnoc :: [a] -> Maybe ([a], a)
+-- The lazy pattern ~(a, b) is important to be productive on infinite lists
+-- and not to be prone to stack overflows.
+-- Expressing the recursion via 'foldr' provides for list fusion.
+unsnoc = foldr (\x -> Just . maybe ([], x) (\(~(a, b)) -> (x : a, b))) Nothing
+{-# INLINABLE unsnoc #-}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/src/Data/Tuple/Compat.hs
new/base-compat-0.13.1/src/Data/Tuple/Compat.hs
--- old/base-compat-0.13.0/src/Data/Tuple/Compat.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/base-compat-0.13.1/src/Data/Tuple/Compat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -20,6 +20,9 @@
#elif MIN_VERSION_ghc_prim(0,7,0)
, Solo(Solo)
#endif
+#if MIN_VERSION_ghc_prim(0,8,0)
+ , getSolo
+#endif
) where
import Data.Tuple
@@ -27,3 +30,7 @@
#if !(MIN_VERSION_base(4,16,0)) && MIN_VERSION_ghc_prim(0,7,0)
import GHC.Tuple (Solo(..))
#endif
+
+#if MIN_VERSION_ghc_prim(0,8,0) && !(MIN_VERSION_ghc_prim(0,11,0))
+import GHC.Tuple (getSolo)
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/src/Data/Typeable/Compat.hs
new/base-compat-0.13.1/src/Data/Typeable/Compat.hs
--- old/base-compat-0.13.0/src/Data/Typeable/Compat.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/base-compat-0.13.1/src/Data/Typeable/Compat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -2,27 +2,33 @@
#if __GLASGOW_HASKELL__ >= 702
{-# LANGUAGE Trustworthy #-}
#endif
-#if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,18,0))
+#if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,19,0))
+{-# LANGUAGE GADTs #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE TypeOperators #-}
#endif
module Data.Typeable.Compat (
module Base
#if MIN_VERSION_base(4,10,0)
, heqT
+, decT
+, hdecT
#endif
) where
import Data.Typeable as Base
-#if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,18,0))
+#if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,19,0))
import Prelude.Compat
+import Data.Void (Void)
import qualified Type.Reflection.Compat as TR
#endif
-#if MIN_VERSION_base(4,10,0) && !(MIN_VERSION_base(4,18,0))
+#if MIN_VERSION_base(4,10,0)
+# if !(MIN_VERSION_base(4,18,0))
-- | Extract a witness of heterogeneous equality of two types
--
-- /Since: 4.18.0.0/
@@ -31,4 +37,24 @@
where
ta = TR.typeRep :: TR.TypeRep a
tb = TR.typeRep :: TR.TypeRep b
+# endif
+
+# if !(MIN_VERSION_base(4,19,0))
+-- | Decide an equality of two types
+--
+-- /Since: 4.19.0.0/
+decT :: forall a b. (Typeable a, Typeable b) => Either (a :~: b -> Void) (a
:~: b)
+decT = case hdecT @a @b of
+ Right HRefl -> Right Refl
+ Left p -> Left (\Refl -> p HRefl)
+
+-- | Decide heterogeneous equality of two types.
+--
+-- /Since: 4.19.0.0/
+hdecT :: forall a b. (Typeable a, Typeable b) => Either (a :~~: b -> Void) (a
:~~: b)
+hdecT = ta `TR.decTypeRep` tb
+ where
+ ta = TR.typeRep :: TR.TypeRep a
+ tb = TR.typeRep :: TR.TypeRep b
+# endif
#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/src/Prelude/Compat.hs
new/base-compat-0.13.1/src/Prelude/Compat.hs
--- old/base-compat-0.13.0/src/Prelude/Compat.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/base-compat-0.13.1/src/Prelude/Compat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -295,7 +295,9 @@
# endif
)
+# if !(MIN_VERSION_base(4,18,0))
import Control.Applicative (liftA2)
+# endif
#else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/base-compat-0.13.0/src/Type/Reflection/Compat.hs
new/base-compat-0.13.1/src/Type/Reflection/Compat.hs
--- old/base-compat-0.13.0/src/Type/Reflection/Compat.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/base-compat-0.13.1/src/Type/Reflection/Compat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -8,6 +8,7 @@
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
+{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE ViewPatterns #-}
# if !(MIN_VERSION_base(4,11,0))
{-# LANGUAGE TypeInType #-}
@@ -18,6 +19,7 @@
module Base
, withTypeable
, pattern TypeRep
+, decTypeRep
#endif
) where
@@ -31,8 +33,16 @@
# if !(MIN_VERSION_base(4,11,0))
import GHC.Exts (TYPE)
import Type.Reflection (Typeable, TypeRep)
+# endif
+
+# if !(MIN_VERSION_base(4,19,0))
+import Data.Void (Void)
+import Prelude.Compat
+import Type.Reflection.Unsafe (typeRepFingerprint)
import Unsafe.Coerce (unsafeCoerce)
+# endif
+# if !(MIN_VERSION_base(4,11,0))
-- | Use a 'TypeRep' as 'Typeable' evidence.
withTypeable :: forall (a :: k) (r :: TYPE rep). ()
=> TypeRep a -> (Typeable a => r) -> r
@@ -79,4 +89,20 @@
pattern TypeRep <- (typeableInstance -> TypeableInstance)
where TypeRep = typeRep
# endif
+
+# if !(MIN_VERSION_base(4,19,0))
+-- | Type equality decision
+--
+-- /Since: 4.19.0.0/
+decTypeRep :: forall k1 k2 (a :: k1) (b :: k2).
+ TypeRep a -> TypeRep b -> Either (a :~~: b -> Void) (a :~~: b)
+decTypeRep a b
+ | sameTypeRep a b = Right (unsafeCoerce HRefl)
+ | otherwise = Left (\HRefl -> errorWithoutStackTrace ("decTypeRep:
Impossible equality proof " ++ show a ++ " :~: " ++ show b))
+{-# INLINEABLE decTypeRep #-}
+
+sameTypeRep :: forall k1 k2 (a :: k1) (b :: k2).
+ TypeRep a -> TypeRep b -> Bool
+sameTypeRep a b = typeRepFingerprint a == typeRepFingerprint b
+# endif
#endif