Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-utility-ht for openSUSE:Factory checked in at 2023-06-22 23:25:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-utility-ht (Old) and /work/SRC/openSUSE:Factory/.ghc-utility-ht.new.15902 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-utility-ht" Thu Jun 22 23:25:38 2023 rev:6 rq:1094454 version:0.0.17 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-utility-ht/ghc-utility-ht.changes 2023-04-04 21:24:44.358664402 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-utility-ht.new.15902/ghc-utility-ht.changes 2023-06-22 23:26:10.201874914 +0200 @@ -1,0 +2,6 @@ +Fri Apr 28 10:51:29 UTC 2023 - Peter Simons <psim...@suse.com> + +- Update utility-ht to version 0.0.17. + Upstream does not provide a change log file. + +------------------------------------------------------------------- Old: ---- utility-ht-0.0.16.tar.gz New: ---- utility-ht-0.0.17.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-utility-ht.spec ++++++ --- /var/tmp/diff_new_pack.cbuoZi/_old 2023-06-22 23:26:11.029879137 +0200 +++ /var/tmp/diff_new_pack.cbuoZi/_new 2023-06-22 23:26:11.029879137 +0200 @@ -20,7 +20,7 @@ %global pkgver %{pkg_name}-%{version} %bcond_with tests Name: ghc-%{pkg_name} -Version: 0.0.16 +Version: 0.0.17 Release: 0 Summary: Various small helper functions for Lists, Maybes, Tuples, Functions License: BSD-3-Clause ++++++ utility-ht-0.0.16.tar.gz -> utility-ht-0.0.17.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/utility-ht-0.0.16/Makefile new/utility-ht-0.0.17/Makefile --- old/utility-ht-0.0.16/Makefile 2021-03-14 19:32:07.000000000 +0100 +++ new/utility-ht-0.0.17/Makefile 2023-04-28 12:49:35.000000000 +0200 @@ -15,4 +15,4 @@ runhaskell Setup test --show-details=streaming update-test: - doctest-extract -i src/ -o src/ --module-prefix DocTest --executable-main=Test.hs --import-tested $$(cat test-module.list) + doctest-extract-0.1 -i src/ -o src/ --module-prefix DocTest --executable-main=Test.hs --import-tested $$(cat test-module.list) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/utility-ht-0.0.16/src/Data/List/HT/Private.hs new/utility-ht-0.0.17/src/Data/List/HT/Private.hs --- old/utility-ht-0.0.16/src/Data/List/HT/Private.hs 2021-03-14 19:32:07.000000000 +0100 +++ new/utility-ht-0.0.17/src/Data/List/HT/Private.hs 2023-04-28 12:49:35.000000000 +0200 @@ -5,7 +5,7 @@ import Data.Maybe as Maybe (fromMaybe, catMaybes, isJust, mapMaybe, ) import Data.Maybe.HT (toMaybe, ) import Control.Monad.HT ((<=<), ) -import Control.Monad (guard, msum, mplus, ) +import Control.Monad (guard, msum, mplus, liftM2, ) import Control.Applicative ((<$>), (<*>), ) import Data.Tuple.HT (mapPair, mapFst, mapSnd, forcePair, swap, ) @@ -952,11 +952,11 @@ (b -> a -> b) -> b -> (c -> d -> d) -> d -> [(a,c)] -> (b,d) foldl'r f b0 g d0 = -- (\(k,d1) -> (k b0, d1)) . - mapFst ($b0) . + mapFst ($ b0) . foldr (\(a,c) ~(k,d) -> (\b -> k $! f b a, g c d)) (id,d0) foldl'rStrict f b0 g d0 = - mapFst ($b0) . + mapFst ($ b0) . foldr (\(a,c) ~(k,d) -> ((,) $! (\b -> k $! f b a)) $! g c d) (id,d0) foldl'rNaive f b g d xs = @@ -1074,7 +1074,7 @@ {- | more efficient implementation of rotate' -prop> \(NonNegative n) (NonEmpty xs) -> rotate n xs == rotate' n (xs::String) +prop> \n (NonEmpty xs) -> rotate n xs == rotate' n (xs::String) -} rotate' n x = uncurry (flip (++)) @@ -1170,6 +1170,47 @@ {- | +>>> equalWith (<=) "ab" "bb" +True +>>> equalWith (<=) "aa" "bbb" +False +>>> equalWith (==) "aa" "aaa" +False + +prop> \as bs -> let f a b = abs (a-b) <= (10::Int) in equalWith f as bs == equalWithRec f as bs +prop> \as bs -> let f a b = abs (a-b) <= (10::Int) in equalWith f as bs == equalWithLiftM f as bs +-} +equalWith, equalWithLiftM, equalWithRec :: + (a -> b -> Bool) -> [a] -> [b] -> Bool +equalWith f as bs = + and $ + zipWith + (\ma mb -> + case (ma,mb) of + (Just a, Just b) -> f a b + (Nothing, Nothing) -> True + _ -> False) + (map Just as ++ [Nothing]) + (map Just bs ++ [Nothing]) + +equalWithLiftM f as bs = + all (Just True ==) $ + zipWith + (\ma mb -> + case (ma,mb) of + (Nothing, Nothing) -> Just True + _ -> liftM2 f ma mb) + (map Just as ++ [Nothing]) + (map Just bs ++ [Nothing]) + +equalWithRec f = + let go (a:as) (b:bs) = f a b && go as bs + go [] [] = True + go _ _ = False + in go + + +{- | Enumerate without Enum context. For Enum equivalent to enumFrom. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/utility-ht-0.0.16/src/Data/List/HT.hs new/utility-ht-0.0.17/src/Data/List/HT.hs --- old/utility-ht-0.0.16/src/Data/List/HT.hs 2021-03-14 19:32:07.000000000 +0100 +++ new/utility-ht-0.0.17/src/Data/List/HT.hs 2023-04-28 12:49:35.000000000 +0200 @@ -62,6 +62,7 @@ L.isAscendingLazy, L.mapAdjacent, L.mapAdjacent1, + L.equalWith, L.range, L.padLeft, L.padRight, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/utility-ht-0.0.16/src/Data/Ord/HT.hs new/utility-ht-0.0.17/src/Data/Ord/HT.hs --- old/utility-ht-0.0.16/src/Data/Ord/HT.hs 2021-03-14 19:32:07.000000000 +0100 +++ new/utility-ht-0.0.17/src/Data/Ord/HT.hs 2023-04-28 12:49:35.000000000 +0200 @@ -9,6 +9,8 @@ {- | @limit (lower,upper) x@ restricts @x@ to the range from @lower@ to @upper@. Don't expect a sensible result for @lower>upper@. + +Called @clamp@ elsewhere. -} {-# INLINE limit #-} limit :: (Ord a) => (a,a) -> a -> a diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/utility-ht-0.0.16/src/DocTest/Data/List/HT/Private.hs new/utility-ht-0.0.17/src/DocTest/Data/List/HT/Private.hs --- old/utility-ht-0.0.16/src/DocTest/Data/List/HT/Private.hs 2021-03-14 19:32:07.000000000 +0100 +++ new/utility-ht-0.0.17/src/DocTest/Data/List/HT/Private.hs 2023-04-28 12:49:35.000000000 +0200 @@ -505,7 +505,7 @@ {-# LINE 1077 "src/Data/List/HT/Private.hs" #-} DocTest.property {-# LINE 1077 "src/Data/List/HT/Private.hs" #-} - (\(NonNegative n) (NonEmpty xs) -> rotate n xs == rotate' n (xs::String)) + (\n (NonEmpty xs) -> rotate n xs == rotate' n (xs::String)) DocTest.printPrefix "Data.List.HT.Private:1084: " {-# LINE 1084 "src/Data/List/HT/Private.hs" #-} DocTest.property @@ -623,36 +623,64 @@ {-# LINE 1164 "src/Data/List/HT/Private.hs" #-} (let f x y z = [x,y]++show(z::Int) in mapAdjacent1 f 'a' [('b',1), ('c',2), ('d',3)]) [ExpectedLine [LineChunk "[\"ab1\",\"bc2\",\"cd3\"]"]] - DocTest.printPrefix "Data.List.HT.Private:1183: " -{-# LINE 1183 "src/Data/List/HT/Private.hs" #-} + DocTest.printPrefix "Data.List.HT.Private:1180: " +{-# LINE 1180 "src/Data/List/HT/Private.hs" #-} DocTest.property -{-# LINE 1183 "src/Data/List/HT/Private.hs" #-} +{-# LINE 1180 "src/Data/List/HT/Private.hs" #-} + (\as bs -> let f a b = abs (a-b) <= (10::Int) in equalWith f as bs == equalWithRec f as bs) + DocTest.printPrefix "Data.List.HT.Private:1181: " +{-# LINE 1181 "src/Data/List/HT/Private.hs" #-} + DocTest.property +{-# LINE 1181 "src/Data/List/HT/Private.hs" #-} + (\as bs -> let f a b = abs (a-b) <= (10::Int) in equalWith f as bs == equalWithLiftM f as bs) + DocTest.printPrefix "Data.List.HT.Private:1173: " +{-# LINE 1173 "src/Data/List/HT/Private.hs" #-} + DocTest.example +{-# LINE 1173 "src/Data/List/HT/Private.hs" #-} + (equalWith (<=) "ab" "bb") + [ExpectedLine [LineChunk "True"]] + DocTest.printPrefix "Data.List.HT.Private:1175: " +{-# LINE 1175 "src/Data/List/HT/Private.hs" #-} + DocTest.example +{-# LINE 1175 "src/Data/List/HT/Private.hs" #-} + (equalWith (<=) "aa" "bbb") + [ExpectedLine [LineChunk "False"]] + DocTest.printPrefix "Data.List.HT.Private:1177: " +{-# LINE 1177 "src/Data/List/HT/Private.hs" #-} + DocTest.example +{-# LINE 1177 "src/Data/List/HT/Private.hs" #-} + (equalWith (==) "aa" "aaa") + [ExpectedLine [LineChunk "False"]] + DocTest.printPrefix "Data.List.HT.Private:1224: " +{-# LINE 1224 "src/Data/List/HT/Private.hs" #-} + DocTest.property +{-# LINE 1224 "src/Data/List/HT/Private.hs" #-} (\(NonNegative n) -> length (range n :: [Integer]) == n) - DocTest.printPrefix "Data.List.HT.Private:1176: " -{-# LINE 1176 "src/Data/List/HT/Private.hs" #-} + DocTest.printPrefix "Data.List.HT.Private:1217: " +{-# LINE 1217 "src/Data/List/HT/Private.hs" #-} DocTest.example -{-# LINE 1176 "src/Data/List/HT/Private.hs" #-} +{-# LINE 1217 "src/Data/List/HT/Private.hs" #-} (range 0 :: [Integer]) [ExpectedLine [LineChunk "[]"]] - DocTest.printPrefix "Data.List.HT.Private:1178: " -{-# LINE 1178 "src/Data/List/HT/Private.hs" #-} + DocTest.printPrefix "Data.List.HT.Private:1219: " +{-# LINE 1219 "src/Data/List/HT/Private.hs" #-} DocTest.example -{-# LINE 1178 "src/Data/List/HT/Private.hs" #-} +{-# LINE 1219 "src/Data/List/HT/Private.hs" #-} (range 1 :: [Integer]) [ExpectedLine [LineChunk "[0]"]] - DocTest.printPrefix "Data.List.HT.Private:1180: " -{-# LINE 1180 "src/Data/List/HT/Private.hs" #-} + DocTest.printPrefix "Data.List.HT.Private:1221: " +{-# LINE 1221 "src/Data/List/HT/Private.hs" #-} DocTest.example -{-# LINE 1180 "src/Data/List/HT/Private.hs" #-} +{-# LINE 1221 "src/Data/List/HT/Private.hs" #-} (range 8 :: [Integer]) [ExpectedLine [LineChunk "[0,1,2,3,4,5,6,7]"]] - DocTest.printPrefix "Data.List.HT.Private:1210: " -{-# LINE 1210 "src/Data/List/HT/Private.hs" #-} + DocTest.printPrefix "Data.List.HT.Private:1251: " +{-# LINE 1251 "src/Data/List/HT/Private.hs" #-} DocTest.property -{-# LINE 1210 "src/Data/List/HT/Private.hs" #-} +{-# LINE 1251 "src/Data/List/HT/Private.hs" #-} (\x -> equating (take 1000) (List.iterate (x+) x) (iterateAssociative (+) (x::Integer))) - DocTest.printPrefix "Data.List.HT.Private:1229: " -{-# LINE 1229 "src/Data/List/HT/Private.hs" #-} + DocTest.printPrefix "Data.List.HT.Private:1270: " +{-# LINE 1270 "src/Data/List/HT/Private.hs" #-} DocTest.property -{-# LINE 1229 "src/Data/List/HT/Private.hs" #-} +{-# LINE 1270 "src/Data/List/HT/Private.hs" #-} (\x -> equating (take 1000) (List.iterate (x+) x) (iterateLeaky (+) (x::Integer))) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/utility-ht-0.0.16/utility-ht.cabal new/utility-ht-0.0.17/utility-ht.cabal --- old/utility-ht-0.0.16/utility-ht.cabal 2021-03-14 19:32:07.000000000 +0100 +++ new/utility-ht-0.0.17/utility-ht.cabal 2023-04-28 12:49:35.000000000 +0200 @@ -1,6 +1,6 @@ Cabal-Version: 2.2 Name: utility-ht -Version: 0.0.16 +Version: 0.0.17 License: BSD-3-Clause License-File: LICENSE Author: Henning Thielemann <hask...@henning-thielemann.de> @@ -23,8 +23,8 @@ However, further splitting the base package might invalidate this statement. . Alternative packages: @Useful@, @MissingH@ -Tested-With: GHC==7.0.2, GHC==7.2.2, GHC==7.4.1, GHC==7.8.2 -Tested-With: GHC==8.6.5 +Tested-With: GHC==7.0.2, GHC==7.2.2, GHC==7.4.2, GHC==7.8.4 +Tested-With: GHC==8.6.5, GHC==9.4.5, GHC==9.6.1 Build-Type: Simple Stability: Stable @@ -39,7 +39,7 @@ Source-Repository this type: darcs location: http://code.haskell.org/~thielema/utility/ - tag: 0.0.16 + tag: 0.0.17 Library Build-Depends: