Hello community,

here is the log from the commit of package ghc-dlist for openSUSE:Factory 
checked in at 2018-05-30 12:06:53
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-dlist (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-dlist.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-dlist"

Wed May 30 12:06:53 2018 rev:9 rq:607786 version:0.8.0.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-dlist/ghc-dlist.changes      2017-09-15 
21:36:14.600985774 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-dlist.new/ghc-dlist.changes 2018-05-30 
12:25:29.105975946 +0200
@@ -1,0 +2,9 @@
+Mon May 14 17:02:11 UTC 2018 - [email protected]
+
+- Update dlist to version 0.8.0.4.
+  * Change QuickCheck upper bound from 2.11 to 2.12
+  * Make `Data.DList` trustworthy
+    ([Bertram Felgenhauer](https://github.com/int-e))
+  * Remove quickcheck-instances dependency for tests
+
+-------------------------------------------------------------------

Old:
----
  dlist-0.8.0.3.tar.gz

New:
----
  dlist-0.8.0.4.tar.gz

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

Other differences:
------------------
++++++ ghc-dlist.spec ++++++
--- /var/tmp/diff_new_pack.LejECP/_old  2018-05-30 12:25:30.205939739 +0200
+++ /var/tmp/diff_new_pack.LejECP/_new  2018-05-30 12:25:30.209939606 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-dlist
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %global pkg_name dlist
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.8.0.3
+Version:        0.8.0.4
 Release:        0
 Summary:        Difference lists
 License:        BSD-3-Clause
@@ -31,7 +31,6 @@
 BuildRequires:  ghc-rpm-macros
 %if %{with tests}
 BuildRequires:  ghc-QuickCheck-devel
-BuildRequires:  ghc-quickcheck-instances-devel
 %endif
 
 %description
@@ -69,7 +68,7 @@
 %ghc_pkg_recache
 
 %files -f %{name}.files
-%doc LICENSE
+%license LICENSE
 
 %files devel -f %{name}-devel.files
 %doc ChangeLog.md README.md

++++++ dlist-0.8.0.3.tar.gz -> dlist-0.8.0.4.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dlist-0.8.0.3/ChangeLog.md 
new/dlist-0.8.0.4/ChangeLog.md
--- old/dlist-0.8.0.3/ChangeLog.md      2017-07-04 16:02:10.000000000 +0200
+++ new/dlist-0.8.0.4/ChangeLog.md      2018-01-19 14:18:09.000000000 +0100
@@ -2,6 +2,16 @@
 Change Log
 ==========
 
+Version 0.8.0.4 (2018-01-19) *Kokborok Day*
+-------------------------------------------
+
+#### Package changes
+
+* Change QuickCheck upper bound from 2.11 to 2.12
+* Make `Data.DList` trustworthy
+  ([Bertram Felgenhauer](https://github.com/int-e))
+* Remove quickcheck-instances dependency for tests
+
 Version 0.8.0.3 (2017-07-04) *Independence Day in the United States*
 --------------------------------------------------------------------
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dlist-0.8.0.3/Data/DList.hs 
new/dlist-0.8.0.4/Data/DList.hs
--- old/dlist-0.8.0.3/Data/DList.hs     2017-07-04 16:02:10.000000000 +0200
+++ new/dlist-0.8.0.4/Data/DList.hs     2018-01-19 14:18:09.000000000 +0100
@@ -4,7 +4,11 @@
 {-# LANGUAGE TypeFamilies #-} -- For the IsList and IsString instances
 
 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708
-{-# LANGUAGE PatternSynonyms, ViewPatterns #-}
+{-# LANGUAGE PatternSynonyms #-}
+-- Mark this module as trustworthy even though we import 'IsList' from 
GHC.Exts,
+-- which is marked unsafe. 'IsList' is safe.
+{-# LANGUAGE Trustworthy #-}
+{-# LANGUAGE ViewPatterns #-}
 #endif
 
 -----------------------------------------------------------------------------
@@ -83,8 +87,8 @@
 
 #if __GLASGOW_HASKELL__ >= 708
 import GHC.Exts (IsList)
--- This is for the IsList methods, which conflict with fromList, toList:
-import qualified GHC.Exts
+-- Make IsList type and methods visible for instance.
+import qualified GHC.Exts (IsList(Item, fromList, toList))
 #endif
 
 #endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dlist-0.8.0.3/dlist.cabal 
new/dlist-0.8.0.4/dlist.cabal
--- old/dlist-0.8.0.3/dlist.cabal       2017-07-04 16:02:10.000000000 +0200
+++ new/dlist-0.8.0.4/dlist.cabal       2018-01-19 14:18:09.000000000 +0100
@@ -1,5 +1,5 @@
 name:                   dlist
-version:                0.8.0.3
+version:                0.8.0.4
 synopsis:               Difference lists
 description:
   Difference lists are a list-like type supporting O(1) append. This is
@@ -45,12 +45,7 @@
   build-depends:        dlist,
                         base,
                         Cabal,
-                        QuickCheck < 2.11
-  -- Semigroup and NonEmpty were introduced in base-4.9 (ghc-8).
-  -- QuickCheck-2.9 included support. QuickCheck-2.10 dropped support.
-  -- quickcheck-instances-0.3.15 has the Arbitrary NonEmpty instance.
-  if impl(ghc > 8)
-    build-depends:      QuickCheck >= 2.9,
-                        quickcheck-instances >= 0.3.15 && < 0.4
-  else
-    build-depends:      QuickCheck >= 2.7
+                        -- QuickCheck-2.10 is the first version supporting
+                        -- base-4.9 (ghc-8) without the Arbitrary NonEmpty
+                        -- instance, which we include ourselves.
+                        QuickCheck >= 2.10 && < 2.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/dlist-0.8.0.3/tests/Main.hs 
new/dlist-0.8.0.4/tests/Main.hs
--- old/dlist-0.8.0.3/tests/Main.hs     2017-07-04 16:02:10.000000000 +0200
+++ new/dlist-0.8.0.4/tests/Main.hs     2018-01-19 14:18:09.000000000 +0100
@@ -1,4 +1,5 @@
-{-# OPTIONS_GHC -Wall #-}
+{-# OPTIONS_GHC -Wall -fno-warn-orphans #-}
+
 {-# LANGUAGE CPP #-}
 #if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ >= 708
 {-# LANGUAGE OverloadedLists #-} -- For the IsList test
@@ -15,9 +16,10 @@
 
--------------------------------------------------------------------------------
 
 import Prelude hiding (concat, foldr, head, map, replicate, tail)
+
 import qualified Data.List as List
-import Text.Show.Functions ()
 import Test.QuickCheck
+import Text.Show.Functions ()
 
 import Data.DList
 
@@ -25,15 +27,10 @@
 
 #if MIN_VERSION_base(4,9,0)
 -- base-4.9 introduced Semigroup and NonEmpty.
+import Control.Applicative (liftA2) -- Arbitrary1 NonEmpty instance
+import Data.Maybe (mapMaybe) -- Arbitrary1 NonEmpty instance
+import Data.List.NonEmpty (NonEmpty(..), nonEmpty)
 import Data.Semigroup (Semigroup(..))
-import Data.List.NonEmpty (NonEmpty(..))
-
--- QuickCheck-2.10 dropped the Arbitrary NonEmpty instance, so we import it 
from
--- quickcheck-instances.
-#if MIN_VERSION_QuickCheck(2,10,0)
-import Test.QuickCheck.Instances ()
-#endif
-
 #endif
 
 
--------------------------------------------------------------------------------
@@ -122,6 +119,21 @@
 prop_Semigroup_append :: [Int] -> [Int] -> Bool
 prop_Semigroup_append xs ys = xs <> ys == toList (fromList xs <> fromList ys)
 
+-- We include the instances for NonEmpty because QuickCheck (>= 2.10) does not.
+-- We could alternatively depend on quickcheck-instances (>= 0.3.15), but
+-- quickcheck-instances has sometimes lagged behind newer GHC/base versions. By
+-- including the instances here, we do not need to track the
+-- quickcheck-instances version, thus simplifying dlist.cabal and reducing the
+-- maintenance effort.
+
+instance Arbitrary1 NonEmpty where
+  liftArbitrary arb = liftA2 (:|) arb (liftArbitrary arb)
+  liftShrink shr (x :| xs) = mapMaybe nonEmpty . liftShrink shr $ x : xs
+
+instance Arbitrary a => Arbitrary (NonEmpty a) where
+  arbitrary = arbitrary1
+  shrink = shrink1
+
 prop_Semigroup_sconcat :: NonEmpty [Int] -> Bool
 prop_Semigroup_sconcat xs = sconcat xs == toList (sconcat (fmap fromList xs))
 


Reply via email to