Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package ghc-indexed-traversable for
openSUSE:Factory checked in at 2023-04-04 21:20:55
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-indexed-traversable (Old)
and /work/SRC/openSUSE:Factory/.ghc-indexed-traversable.new.19717 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-indexed-traversable"
Tue Apr 4 21:20:55 2023 rev:7 rq:1075928 version:0.1.2.1
Changes:
--------
---
/work/SRC/openSUSE:Factory/ghc-indexed-traversable/ghc-indexed-traversable.changes
2022-10-13 15:42:27.890775365 +0200
+++
/work/SRC/openSUSE:Factory/.ghc-indexed-traversable.new.19717/ghc-indexed-traversable.changes
2023-04-04 21:21:05.965427706 +0200
@@ -1,0 +2,14 @@
+Thu Mar 30 17:07:15 UTC 2023 - Peter Simons <[email protected]>
+
+- Updated spec file to conform with ghc-rpm-macros-2.5.2.
+
+-------------------------------------------------------------------
+Sun Mar 12 10:33:23 UTC 2023 - Peter Simons <[email protected]>
+
+- Update indexed-traversable to version 0.1.2.1.
+ # 0.1.2.1 [2022-12-28]
+
+ - TraversableWithIndex [] doesn't use `zip [0..]` idiom anymore.
+ https://gitlab.haskell.org/ghc/ghc/-/issues/22673
+
+-------------------------------------------------------------------
Old:
----
indexed-traversable-0.1.2.tar.gz
indexed-traversable.cabal
New:
----
indexed-traversable-0.1.2.1.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ ghc-indexed-traversable.spec ++++++
--- /var/tmp/diff_new_pack.ZRPP3E/_old 2023-04-04 21:21:06.521430855 +0200
+++ /var/tmp/diff_new_pack.ZRPP3E/_new 2023-04-04 21:21:06.537430945 +0200
@@ -1,7 +1,7 @@
#
# spec file for package ghc-indexed-traversable
#
-# Copyright (c) 2022 SUSE LLC
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,19 +17,24 @@
%global pkg_name indexed-traversable
+%global pkgver %{pkg_name}-%{version}
Name: ghc-%{pkg_name}
-Version: 0.1.2
+Version: 0.1.2.1
Release: 0
Summary: FunctorWithIndex, FoldableWithIndex, TraversableWithIndex
License: BSD-2-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/2.cabal#/%{pkg_name}.cabal
BuildRequires: ghc-Cabal-devel
BuildRequires: ghc-array-devel
+BuildRequires: ghc-array-prof
+BuildRequires: ghc-base-devel
+BuildRequires: ghc-base-prof
BuildRequires: ghc-containers-devel
+BuildRequires: ghc-containers-prof
BuildRequires: ghc-rpm-macros
BuildRequires: ghc-transformers-devel
+BuildRequires: ghc-transformers-prof
ExcludeArch: %{ix86}
%description
@@ -64,9 +69,24 @@
This package provides the Haskell %{pkg_name} library development
files.
+%package -n ghc-%{pkg_name}-doc
+Summary: Haskell %{pkg_name} library documentation
+Requires: ghc-filesystem
+BuildArch: noarch
+
+%description -n ghc-%{pkg_name}-doc
+This package provides the Haskell %{pkg_name} library documentation.
+
+%package -n ghc-%{pkg_name}-prof
+Summary: Haskell %{pkg_name} profiling library
+Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
+Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
+
+%description -n ghc-%{pkg_name}-prof
+This package provides the Haskell %{pkg_name} profiling library.
+
%prep
%autosetup -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
%build
%ghc_lib_build
@@ -86,4 +106,9 @@
%files devel -f %{name}-devel.files
%doc Changelog.md
+%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
+%license LICENSE
+
+%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
+
%changelog
++++++ indexed-traversable-0.1.2.tar.gz -> indexed-traversable-0.1.2.1.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/indexed-traversable-0.1.2/Changelog.md
new/indexed-traversable-0.1.2.1/Changelog.md
--- old/indexed-traversable-0.1.2/Changelog.md 2001-09-09 03:46:40.000000000
+0200
+++ new/indexed-traversable-0.1.2.1/Changelog.md 2001-09-09
03:46:40.000000000 +0200
@@ -1,3 +1,8 @@
+# 0.1.2.1 [2022-12-28]
+
+- TraversableWithIndex [] doesn't use `zip [0..]` idiom anymore.
+ https://gitlab.haskell.org/ghc/ghc/-/issues/22673
+
# 0.1.2 [2021-10-30]
- Changed `(<$>)` + `(<*>)` to `liftA2` to potentially avoid extra `fmap`.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/indexed-traversable-0.1.2/indexed-traversable.cabal
new/indexed-traversable-0.1.2.1/indexed-traversable.cabal
--- old/indexed-traversable-0.1.2/indexed-traversable.cabal 2001-09-09
03:46:40.000000000 +0200
+++ new/indexed-traversable-0.1.2.1/indexed-traversable.cabal 2001-09-09
03:46:40.000000000 +0200
@@ -1,6 +1,6 @@
cabal-version: 1.12
name: indexed-traversable
-version: 0.1.2
+version: 0.1.2.1
build-type: Simple
license: BSD2
license-file: LICENSE
@@ -46,8 +46,10 @@
|| ==8.6.5
|| ==8.8.4
|| ==8.10.7
- || ==9.0.1
- || ==9.2.1
+ || ==9.0.2
+ || ==9.2.7
+ || ==9.4.4
+ || ==9.6.1
source-repository head
type: git
@@ -59,7 +61,8 @@
ghc-options: -Wall
hs-source-dirs: src
other-modules:
- GhcExts
+ CoerceCompat
+ GhcList
WithIndex
exposed-modules:
@@ -69,7 +72,7 @@
build-depends:
array >=0.3.0.2 && <0.6
- , base >=4.3 && <4.17
+ , base >=4.3 && <4.19
, containers >=0.4.0.0 && <0.7
, transformers >=0.3.0.0 && <0.7
@@ -81,8 +84,8 @@
if !impl(ghc >=8.0)
build-depends:
- base-orphans >=0.8.3 && <0.9
- , semigroups >=0.18.4 && <0.20
+ base-orphans >=0.8.3 && <0.10
+ , semigroups >=0.18.4 && <0.21
, transformers-compat >=0.6.6 && <0.8
if (impl(ghc >=7.0) && impl(ghc <7.6))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/indexed-traversable-0.1.2/src/CoerceCompat.hs
new/indexed-traversable-0.1.2.1/src/CoerceCompat.hs
--- old/indexed-traversable-0.1.2/src/CoerceCompat.hs 1970-01-01
01:00:00.000000000 +0100
+++ new/indexed-traversable-0.1.2.1/src/CoerceCompat.hs 2001-09-09
03:46:40.000000000 +0200
@@ -0,0 +1,29 @@
+{-# LANGUAGE CPP #-}
+#if __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+module CoerceCompat where
+
+#if __GLASGOW_HASKELL__ >=708
+import Data.Coerce (Coercible, coerce)
+#else
+import Unsafe.Coerce (unsafeCoerce)
+#endif
+
+
+#if __GLASGOW_HASKELL__ >=708
+(#.) :: Coercible b c => (b -> c) -> (a -> b) -> (a -> c)
+_ #. x = coerce x
+
+(#..) :: Coercible b c => (b -> c) -> (i -> a -> b) -> (i -> a -> c)
+_ #.. x = coerce x
+#else
+(#.) :: (b -> c) -> (a -> b) -> (a -> c)
+_ #. x = unsafeCoerce x
+
+(#..) :: (b -> c) -> (i -> a -> b) -> (i -> a -> c)
+_ #.. x = unsafeCoerce x
+#endif
+infixr 9 #., #..
+{-# INLINE (#.) #-}
+{-# INLINE (#..) #-}
\ No newline at end of file
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/indexed-traversable-0.1.2/src/Data/Foldable/WithIndex.hs
new/indexed-traversable-0.1.2.1/src/Data/Foldable/WithIndex.hs
--- old/indexed-traversable-0.1.2/src/Data/Foldable/WithIndex.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/indexed-traversable-0.1.2.1/src/Data/Foldable/WithIndex.hs
2001-09-09 03:46:40.000000000 +0200
@@ -31,7 +31,9 @@
import Data.Foldable (Foldable, any)
import Data.Monoid (All (..), Any (..))
-import GhcExts (build)
+import CoerceCompat ((#.), (#..))
+import GhcList (build)
+
import WithIndex
-- | Return whether or not any element in a container satisfies a predicate,
with access to the index @i@.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/indexed-traversable-0.1.2/src/Data/Traversable/WithIndex.hs
new/indexed-traversable-0.1.2.1/src/Data/Traversable/WithIndex.hs
--- old/indexed-traversable-0.1.2/src/Data/Traversable/WithIndex.hs
2001-09-09 03:46:40.000000000 +0200
+++ new/indexed-traversable-0.1.2.1/src/Data/Traversable/WithIndex.hs
2001-09-09 03:46:40.000000000 +0200
@@ -28,6 +28,7 @@
import qualified Control.Monad.Trans.State.Lazy as Lazy
import WithIndex
+import CoerceCompat
-- | Traverse with an index (and the arguments flipped).
--
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/indexed-traversable-0.1.2/src/GhcExts.hs
new/indexed-traversable-0.1.2.1/src/GhcExts.hs
--- old/indexed-traversable-0.1.2/src/GhcExts.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/indexed-traversable-0.1.2.1/src/GhcExts.hs 1970-01-01
01:00:00.000000000 +0100
@@ -1,9 +0,0 @@
-{-# LANGUAGE CPP #-}
-#if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
-#endif
-module GhcExts (
- build,
-) where
-
-import GHC.Exts (build)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/indexed-traversable-0.1.2/src/GhcList.hs
new/indexed-traversable-0.1.2.1/src/GhcList.hs
--- old/indexed-traversable-0.1.2/src/GhcList.hs 1970-01-01
01:00:00.000000000 +0100
+++ new/indexed-traversable-0.1.2.1/src/GhcList.hs 2001-09-09
03:46:40.000000000 +0200
@@ -0,0 +1,15 @@
+{-# LANGUAGE CPP #-}
+#if MIN_VERSION_base(4,17,0)
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+module GhcList (
+ build,
+) where
+
+#if MIN_VERSION_base(4,17,0)
+import GHC.List (build)
+#else
+import GHC.Exts (build)
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/indexed-traversable-0.1.2/src/WithIndex.hs
new/indexed-traversable-0.1.2.1/src/WithIndex.hs
--- old/indexed-traversable-0.1.2/src/WithIndex.hs 2001-09-09
03:46:40.000000000 +0200
+++ new/indexed-traversable-0.1.2.1/src/WithIndex.hs 2001-09-09
03:46:40.000000000 +0200
@@ -7,8 +7,14 @@
{-# LANGUAGE TypeOperators #-}
{-# LANGUAGE UndecidableInstances #-}
+{-# LANGUAGE CPP #-}
+#if __GLASGOW_HASKELL__ >= 704
+{-# LANGUAGE Safe #-}
+#elif __GLASGOW_HASKELL__ >= 702
+{-# LANGUAGE Trustworthy #-}
+#endif
+
#if __GLASGOW_HASKELL__ >= 702
-{-# LANGUAGE Trustworthy #-}
{-# LANGUAGE DefaultSignatures #-}
#endif
@@ -19,7 +25,7 @@
import Prelude
(Either (..), Functor (..), Int, Maybe (..), Monad (..), Num (..),
error,
- flip, id, seq, snd, ($!), ($), (.), zip)
+ flip, id, seq, snd, ($!), ($), (.))
import Control.Applicative
(Applicative (..), Const (..), ZipList (..), (<$>), liftA2)
@@ -65,11 +71,7 @@
import Data.Orphans ()
#endif
-#if __GLASGOW_HASKELL__ >=708
-import Data.Coerce (Coercible, coerce)
-#else
-import Unsafe.Coerce (unsafeCoerce)
-#endif
+import CoerceCompat
-------------------------------------------------------------------------------
-- FunctorWithIndex
@@ -263,9 +265,15 @@
go !n (x:xs) = f n x (go (n + 1) xs)
{-# INLINE ifoldr #-}
instance TraversableWithIndex Int [] where
- itraverse f = traverse (uncurry' f) . zip [0..]
+ itraverse = itraverseListOff 0
{-# INLINE itraverse #-}
+-- traverse (uncurry' f) . zip [0..] seems to not work well:
+-- https://gitlab.haskell.org/ghc/ghc/-/issues/22673
+itraverseListOff :: Applicative f => Int -> (Int -> a -> f b) -> [a] -> f [b]
+itraverseListOff !_ _ [] = pure []
+itraverseListOff !off f (x:xs) = liftA2 (:) (f off x) (itraverseListOff (off +
1) f xs)
+
-- TODO: we could experiment with streaming framework
-- imapListFB f xs = build (\c n -> ifoldr (\i a -> c (f i a)) n xs)
@@ -292,7 +300,7 @@
{-# INLINE ifoldMap #-}
instance TraversableWithIndex Int NonEmpty where
itraverse f ~(a :| as) =
- liftA2 (:|) (f 0 a) (traverse (uncurry' f) (zip [1..] as))
+ liftA2 (:|) (f 0 a) (itraverseListOff 1 f as)
{-# INLINE itraverse #-}
-------------------------------------------------------------------------------
@@ -632,23 +640,6 @@
-- Misc.
-------------------------------------------------------------------------------
-#if __GLASGOW_HASKELL__ >=708
-(#.) :: Coercible b c => (b -> c) -> (a -> b) -> (a -> c)
-_ #. x = coerce x
-
-(#..) :: Coercible b c => (b -> c) -> (i -> a -> b) -> (i -> a -> c)
-_ #.. x = coerce x
-#else
-(#.) :: (b -> c) -> (a -> b) -> (a -> c)
-_ #. x = unsafeCoerce x
-
-(#..) :: (b -> c) -> (i -> a -> b) -> (i -> a -> c)
-_ #.. x = unsafeCoerce x
-#endif
-infixr 9 #., #..
-{-# INLINE (#.) #-}
-{-# INLINE (#..)#-}
-
skip :: a -> ()
skip _ = ()
{-# INLINE skip #-}
@@ -670,7 +661,7 @@
instance Applicative f => Monoid (Traversed a f) where
mempty = Traversed (pure (error "Traversed: value used"))
{-# INLINE mempty #-}
- Traversed ma `mappend` Traversed mb = Traversed (ma *> mb)
+ mappend = (<>)
{-# INLINE mappend #-}
------------------------------------------------------------------------------
@@ -691,7 +682,7 @@
instance Monad m => Monoid (Sequenced a m) where
mempty = Sequenced (return (error "Sequenced: value used"))
{-# INLINE mempty #-}
- Sequenced ma `mappend` Sequenced mb = Sequenced (ma >> mb)
+ mappend = (<>)
{-# INLINE mappend #-}
------------------------------------------------------------------------------