Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package ghc-fmt for openSUSE:Factory checked 
in at 2021-08-25 20:56:51
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-fmt (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-fmt.new.1899 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-fmt"

Wed Aug 25 20:56:51 2021 rev:2 rq:912598 version:0.6.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-fmt/ghc-fmt.changes  2020-12-22 
11:32:01.185060545 +0100
+++ /work/SRC/openSUSE:Factory/.ghc-fmt.new.1899/ghc-fmt.changes        
2021-08-25 20:57:40.177203617 +0200
@@ -1,0 +2,14 @@
+Sun Aug  1 17:38:21 UTC 2021 - [email protected]
+
+- Update fmt to version 0.6.2.0.
+  # 0.6.2.0
+
+  * Cleared `hspec` upper bound
+  * Qualified all Data.List imports
+  * Fixed tests to work with newer (>=0.4) neat-interpolation (#30)
+  * Adjusted lower bounds of formatting dependency to avoid unsigned 0
+    issues (#31)
+  * fixed floatF handling of negative numbers (#36)
+  * unconfused ``||++|`` and ``|++||`` (#29)
+
+-------------------------------------------------------------------

Old:
----
  fmt-0.6.1.2.tar.gz

New:
----
  fmt-0.6.2.0.tar.gz

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

Other differences:
------------------
++++++ ghc-fmt.spec ++++++
--- /var/tmp/diff_new_pack.CZm8hX/_old  2021-08-25 20:57:40.705202924 +0200
+++ /var/tmp/diff_new_pack.CZm8hX/_new  2021-08-25 20:57:40.709202918 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-fmt
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # 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 fmt
 %bcond_with tests
 Name:           ghc-%{pkg_name}
-Version:        0.6.1.2
+Version:        0.6.2.0
 Release:        0
 Summary:        A new formatting library
 License:        BSD-3-Clause

++++++ fmt-0.6.1.2.tar.gz -> fmt-0.6.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/CHANGELOG.md new/fmt-0.6.2.0/CHANGELOG.md
--- old/fmt-0.6.1.2/CHANGELOG.md        2019-06-26 09:49:04.000000000 +0200
+++ new/fmt-0.6.2.0/CHANGELOG.md        2021-07-28 14:59:11.000000000 +0200
@@ -1,3 +1,13 @@
+# 0.6.2.0
+
+* Cleared `hspec` upper bound
+* Qualified all Data.List imports
+* Fixed tests to work with newer (>=0.4) neat-interpolation (#30)
+* Adjusted lower bounds of formatting dependency to avoid unsigned 0
+  issues (#31)
+* fixed floatF handling of negative numbers (#36)
+* unconfused ``||++|`` and ``|++||`` (#29)
+
 # 0.6.1.2
 
 * Bumped the `hspec` upper bound.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/fmt.cabal new/fmt-0.6.2.0/fmt.cabal
--- old/fmt-0.6.1.2/fmt.cabal   2019-06-26 09:57:26.000000000 +0200
+++ new/fmt-0.6.2.0/fmt.cabal   2021-07-28 14:59:11.000000000 +0200
@@ -1,5 +1,5 @@
 name:                fmt
-version:             0.6.1.2
+version:             0.6.2.0
 synopsis:            A new formatting library
 description:
   A new formatting library that tries to be simple to understand while still
@@ -37,13 +37,13 @@
     conversion. There are some convenience formatters which aren't present in
     @formatting@ (like ones for formatting maps, lists, converting to base64,
     etc). Some find the operator syntax annoying, while others like it.
-homepage:            http://github.com/aelve/fmt
-bug-reports:         http://github.com/aelve/fmt/issues
+homepage:            http://github.com/cdornan/fmt
+bug-reports:         http://github.com/cdornan/fmt/issues
 license:             BSD3
 license-file:        LICENSE
 author:              Artyom Kazak <[email protected]>,
                      Dmitry Kovanikov <[email protected]>
-maintainer:          [email protected]
+maintainer:          Chris Dornan <[email protected]>
 -- copyright:
 category:            Text
 tested-with:
@@ -52,6 +52,8 @@
   GHC == 8.2.2
   GHC == 8.4.4
   GHC == 8.6.4
+  GHC == 8.6.5
+  GHC == 8.10.4
 build-type:          Simple
 extra-source-files:  CHANGELOG.md
                      tests/doctest-config.json
@@ -59,7 +61,7 @@
 
 source-repository head
   type:                git
-  location:            git://github.com/aelve/fmt.git
+  location:            git://github.com/cdornan/fmt.git
 
 library
   exposed-modules:     Fmt
@@ -77,7 +79,7 @@
                        bytestring,
                        call-stack,
                        containers,
-                       formatting >= 6.3.4,
+                       formatting >= 7.0.0,
                        microlens >= 0.3,
                        text,
                        time,
@@ -99,7 +101,7 @@
                      , call-stack
                      , containers
                      , fmt
-                     , hspec >= 2.2 && < 2.8
+                     , hspec >= 2.2
                      , neat-interpolation
                      , text
                      , vector
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/lib/Fmt/Internal/Core.hs 
new/fmt-0.6.2.0/lib/Fmt/Internal/Core.hs
--- old/fmt-0.6.1.2/lib/Fmt/Internal/Core.hs    2019-06-26 09:22:34.000000000 
+0200
+++ new/fmt-0.6.2.0/lib/Fmt/Internal/Core.hs    2021-07-28 14:59:11.000000000 
+0200
@@ -96,14 +96,14 @@
 (||++||) a rest = show a |+ rest
 {-# INLINE (||++||) #-}
 
-(||++|) :: (Buildable a, FromBuilder b) => a -> Builder -> b
-(||++|) a rest = a |++| rest
-{-# INLINE (||++|) #-}
-
-(|++||) :: (Show a, FromBuilder b) => a -> Builder -> b
-(|++||) a rest = a ||++|| rest
+(|++||) :: (Buildable a, FromBuilder b) => a -> Builder -> b
+(|++||) a rest = a |++| rest
 {-# INLINE (|++||) #-}
 
+(||++|) :: (Show a, FromBuilder b) => a -> Builder -> b
+(||++|) a rest = a ||++|| rest
+{-# INLINE (||++|) #-}
+
 infixr 1 |++|
 infixr 1 ||++||
 infixr 1 ||++|
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/lib/Fmt/Internal/Formatters.hs 
new/fmt-0.6.2.0/lib/Fmt/Internal/Formatters.hs
--- old/fmt-0.6.1.2/lib/Fmt/Internal/Formatters.hs      2019-06-26 
09:22:34.000000000 +0200
+++ new/fmt-0.6.2.0/lib/Fmt/Internal/Formatters.hs      2021-07-28 
15:01:32.000000000 +0200
@@ -9,7 +9,7 @@
 
 
 -- Generic useful things
-import Data.List
+import Data.List (intersperse)
 import Lens.Micro
 #if __GLASGOW_HASKELL__ < 804
 import Data.Monoid ((<>))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/lib/Fmt/Internal/Generic.hs 
new/fmt-0.6.2.0/lib/Fmt/Internal/Generic.hs
--- old/fmt-0.6.1.2/lib/Fmt/Internal/Generic.hs 2019-06-26 09:22:34.000000000 
+0200
+++ new/fmt-0.6.2.0/lib/Fmt/Internal/Generic.hs 2021-07-28 14:58:19.000000000 
+0200
@@ -21,7 +21,7 @@
 import Data.List.NonEmpty (NonEmpty)
 #endif
 
-import Data.List
+import Data.List as L
 import Data.Text.Lazy.Builder hiding (fromString)
 import GHC.Generics
 import Formatting.Buildable
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/lib/Fmt/Internal/Numeric.hs 
new/fmt-0.6.2.0/lib/Fmt/Internal/Numeric.hs
--- old/fmt-0.6.1.2/lib/Fmt/Internal/Numeric.hs 2019-06-26 09:22:34.000000000 
+0200
+++ new/fmt-0.6.2.0/lib/Fmt/Internal/Numeric.hs 2021-07-28 14:59:11.000000000 
+0200
@@ -69,13 +69,16 @@
 Numbers smaller than 1e-6 or bigger-or-equal to 1e21 will be displayed using
 scientific notation:
 
+>>> listF' floatF [-1.2,-12.2]
+"[-1.2, -12.2]"
 >>> listF' floatF [1e-6,9e-7]
 "[0.000001, 9.0e-7]"
 >>> listF' floatF [9e20,1e21]
 "[900000000000000000000.0, 1.0e21]"
 -}
 floatF :: Real a => a -> Builder
-floatF a | d < 1e-6 || d >= 1e21 = build $ showEFloat Nothing d ""
+floatF a | d < 0                 = "-" <> floatF (-d)
+         | d < 1e-6 || d >= 1e21 = build $ showEFloat Nothing d ""
          | otherwise             = build $ showFFloat Nothing d ""
   where d = realToFrac a :: Double
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/lib/Fmt/Internal.hs 
new/fmt-0.6.2.0/lib/Fmt/Internal.hs
--- old/fmt-0.6.1.2/lib/Fmt/Internal.hs 2019-06-26 09:22:34.000000000 +0200
+++ new/fmt-0.6.2.0/lib/Fmt/Internal.hs 2021-07-28 14:58:19.000000000 +0200
@@ -72,7 +72,9 @@
   hexF = fromLazyText . TL.decodeLatin1 . BB.toLazyByteString . 
BB.lazyByteStringHex
 
 instance {-# OVERLAPPABLE #-} Integral a => FormatAsHex a where
-  hexF = F.hex
+  hexF i = sgn <> F.hex (abs i)
+    where
+      sgn = if i<0 then "-" else ""
 
 ----------------------------------------------------------------------------
 -- Base64
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/lib/Fmt/Time.hs 
new/fmt-0.6.2.0/lib/Fmt/Time.hs
--- old/fmt-0.6.1.2/lib/Fmt/Time.hs     2019-06-26 09:22:34.000000000 +0200
+++ new/fmt-0.6.2.0/lib/Fmt/Time.hs     2021-07-28 14:58:19.000000000 +0200
@@ -122,7 +122,11 @@
 
 
 import           Data.List               (find)
+
+#if !MIN_VERSION_base(4,9,0)
 import           Data.Monoid             ((<>))
+#endif
+
 import           Data.Text               (Text)
 import qualified Data.Text               as T
 import           Formatting.Buildable    (build)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/fmt-0.6.1.2/tests/Main.hs 
new/fmt-0.6.2.0/tests/Main.hs
--- old/fmt-0.6.1.2/tests/Main.hs       2019-06-26 09:22:34.000000000 +0200
+++ new/fmt-0.6.2.0/tests/Main.hs       2021-07-28 14:58:19.000000000 +0200
@@ -2,13 +2,16 @@
 {-# LANGUAGE QuasiQuotes #-}
 {-# LANGUAGE DeriveGeneric #-}
 {-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE CPP #-}
 
 
 module Main where
 
 
 -- Monoid
+#if __GLASGOW_HASKELL__ < 804
 import Data.Monoid ((<>))
+#endif
 -- Text
 import Data.Text (Text)
 import qualified Data.Text as T
@@ -277,43 +280,43 @@
         blockListF ([] :: [Int]) ==#> "[]\n"
 
     nullElements = it "null elements" $ do
-        blockListF ([""] :: [Text]) ==#> [text|
+        blockListF ([""] :: [Text]) ==$> [text|
           -
           |]
-        blockListF (["",""] :: [Text]) ==#> [text|
+        blockListF (["",""] :: [Text]) ==$> [text|
           -
           -
           |]
-        blockListF (["","a",""] :: [Text]) ==#> [text|
+        blockListF (["","a",""] :: [Text]) ==$> [text|
           -
           - a
           -
           |]
 
     singleLineElements = it "single-line elements" $ do
-        blockListF (["a"] :: [Text]) ==#> [text|
+        blockListF (["a"] :: [Text]) ==$> [text|
           - a
           |]
-        blockListF (["a","b"] :: [Text]) ==#> [text|
+        blockListF (["a","b"] :: [Text]) ==$> [text|
           -_a
           -_b
           |]
-        blockListF (["a","b","ccc"] :: [Text]) ==#> [text|
+        blockListF (["a","b","ccc"] :: [Text]) ==$> [text|
           - a
           - b
           - ccc
           |]
 
     multiLineElements = it "multi-line elements" $ do
-        blockListF (["a\nx"] :: [Text]) ==#> [text|
+        blockListF (["a\nx"] :: [Text]) ==$> [text|
           - a
             x
           |]
-        blockListF (["a\n x"] :: [Text]) ==#> [text|
+        blockListF (["a\n x"] :: [Text]) ==$> [text|
           - a
              x
           |]
-        blockListF (["a\n x"," b\nxx\ny y ","c\n\n"] :: [Text]) ==#> [text|
+        blockListF (["a\n x"," b\nxx\ny y ","c\n\n"] :: [Text]) ==$> [text|
           - a
              x
           -  b
@@ -324,17 +327,17 @@
           |]
 
     mixed = it "mix of single-line and multi-line" $ do
-        blockListF (["a\nx","b"] :: [Text]) ==#> [text|
+        blockListF (["a\nx","b"] :: [Text]) ==$> [text|
           - a
             x
           - b
           |]
-        blockListF (["a\nx","b\n"] :: [Text]) ==#> [text|
+        blockListF (["a\nx","b\n"] :: [Text]) ==$> [text|
           - a
             x
           - b
           |]
-        blockListF (["a"," b\nxx\ny y ","c\n\n"] :: [Text]) ==#> [text|
+        blockListF (["a"," b\nxx\ny y ","c\n\n"] :: [Text]) ==$> [text|
           - a
           -  b
             xx
@@ -356,18 +359,18 @@
         jsonListF ([] :: [Int]) ==#> "[]\n"
 
     nullElements = it "null elements" $ do
-        jsonListF ([""] :: [Text]) ==#> [text|
+        jsonListF ([""] :: [Text]) ==$> [text|
           [
 
           ]
           |]
-        jsonListF (["",""] :: [Text]) ==#> [text|
+        jsonListF (["",""] :: [Text]) ==$> [text|
           [
 
           ,
           ]
           |]
-        jsonListF (["","a",""] :: [Text]) ==#> [text|
+        jsonListF (["","a",""] :: [Text]) ==$> [text|
           [
 
           , a
@@ -376,18 +379,18 @@
           |]
 
     singleLineElements = it "single-line elements" $ do
-        jsonListF (["a"] :: [Text]) ==#> [text|
+        jsonListF (["a"] :: [Text]) ==$> [text|
           [
             a
           ]
           |]
-        jsonListF (["a","b"] :: [Text]) ==#> [text|
+        jsonListF (["a","b"] :: [Text]) ==$> [text|
           [
             a
           , b
           ]
           |]
-        jsonListF (["a","b","ccc"] :: [Text]) ==#> [text|
+        jsonListF (["a","b","ccc"] :: [Text]) ==$> [text|
           [
             a
           , b
@@ -396,19 +399,19 @@
           |]
 
     multiLineElements = it "multi-line elements" $ do
-        jsonListF (["a\nx"] :: [Text]) ==#> [text|
+        jsonListF (["a\nx"] :: [Text]) ==$> [text|
           [
             a
             x
           ]
           |]
-        jsonListF (["a\n x"] :: [Text]) ==#> [text|
+        jsonListF (["a\n x"] :: [Text]) ==$> [text|
           [
             a
              x
           ]
           |]
-        jsonListF (["a\n x"," b\nxx\ny y ","c\n\n"] :: [Text]) ==#> [text|
+        jsonListF (["a\n x"," b\nxx\ny y ","c\n\n"] :: [Text]) ==$> [text|
           [
             a
              x
@@ -421,21 +424,21 @@
           |]
 
     mixed = it "mix of single-line and multi-line" $ do
-        jsonListF (["a\nx","b"] :: [Text]) ==#> [text|
+        jsonListF (["a\nx","b"] :: [Text]) ==$> [text|
           [
             a
             x
           , b
           ]
           |]
-        jsonListF (["a\nx","b\n"] :: [Text]) ==#> [text|
+        jsonListF (["a\nx","b\n"] :: [Text]) ==$> [text|
           [
             a
             x
           , b
           ]
           |]
-        jsonListF (["a"," b\nxx\ny y ","c\n\n"] :: [Text]) ==#> [text|
+        jsonListF (["a"," b\nxx\ny y ","c\n\n"] :: [Text]) ==$> [text|
           [
             a
           ,  b
@@ -477,7 +480,7 @@
     blockMapF ([("hi", ""),
                 ("foo"," a\n  b"),
                 ("bar","a"),
-                ("baz","a\ng")] :: [(Text, Text)]) ==#> [text|
+                ("baz","a\ng")] :: [(Text, Text)]) ==$> [text|
       hi:
       foo:
          a
@@ -496,7 +499,7 @@
     jsonMapF ([("hi", ""),
                ("foo"," a\n  b"),
                ("bar","a"),
-               ("baz","a\ng")] :: [(Text, Text)]) ==#> [text|
+               ("baz","a\ng")] :: [(Text, Text)]) ==$> [text|
       {
         hi:
       , foo:
@@ -559,40 +562,40 @@
   where
     allNonEmpty = describe "all non-empty" $ do
       it "1 element (2 lines)" $ do
-          tupleF ["a\nx" :: Builder] ==#> [text|
+          tupleF ["a\nx" :: Builder] ==$> [text|
             ( a
               x )
             |]
-          tupleF ["a\n x" :: Builder] ==#> [text|
+          tupleF ["a\n x" :: Builder] ==$> [text|
             ( a
                x )
             |]
-          tupleF [" a\nx\n" :: Builder] ==#> [text|
+          tupleF [" a\nx\n" :: Builder] ==$> [text|
             (  a
               x )
             |]
       it "1 element (3 lines)" $ do
-          tupleF ["a\nb\nc" :: Builder] ==#> [text|
+          tupleF ["a\nb\nc" :: Builder] ==$> [text|
             ( a
               b
               c )
             |]
       it "2 elements (1 line + 2 lines)" $ do
-          tupleF ["a", "b\nc" :: Builder] ==#> [text|
+          tupleF ["a", "b\nc" :: Builder] ==$> [text|
             ( a
             ,
               b
               c )
             |]
       it "2 elements (2 lines + 1 line)" $ do
-          tupleF ["a\nb", "c" :: Builder] ==#> [text|
+          tupleF ["a\nb", "c" :: Builder] ==$> [text|
             ( a
               b
             ,
               c )
             |]
       it "3 elements (each has 2 lines)" $ do
-          tupleF ["a\nb", "c\nd", "e\nf" :: Builder] ==#> [text|
+          tupleF ["a\nb", "c\nd", "e\nf" :: Builder] ==$> [text|
             ( a
               b
             ,
@@ -605,21 +608,21 @@
 
     someEmpty = describe "some empty" $ do
       it "2 elements (0 + 2)" $ do
-          tupleF ["", "a\nb" :: Builder] ==#> [text|
+          tupleF ["", "a\nb" :: Builder] ==$> [text|
             (
             ,
               a
               b )
             |]
       it "2 elements (2 + 0)" $ do
-          tupleF ["a\nb", "" :: Builder] ==#> [text|
+          tupleF ["a\nb", "" :: Builder] ==$> [text|
             ( a
               b
             ,
               )
             |]
       it "3 elements (0 + 2 + 0)" $ do
-          tupleF ["", "a\nb", "" :: Builder] ==#> [text|
+          tupleF ["", "a\nb", "" :: Builder] ==$> [text|
             (
             ,
               a
@@ -628,7 +631,7 @@
               )
             |]
       it "3 elements (2 + 0 + 2)" $ do
-          tupleF ["a\nb", "", "c\nd" :: Builder] ==#> [text|
+          tupleF ["a\nb", "", "c\nd" :: Builder] ==$> [text|
             ( a
               b
             ,
@@ -637,7 +640,7 @@
               d )
             |]
       it "4 elements (2 + 0 + 0 + 2)" $ do
-          tupleF ["a\nb", "", "", "c\nd" :: Builder] ==#> [text|
+          tupleF ["a\nb", "", "", "c\nd" :: Builder] ==$> [text|
             ( a
               b
             ,
@@ -678,7 +681,7 @@
       genericF (Foo n) ==#> "<Foo: 25>"
       genericF (Bar (n-1) (n+1)) ==#> "<Bar: 24, 26>"
     it "records" $ do
-      genericF (Qux 1 True "hi") ==#> [text|
+      genericF (Qux 1 True "hi") ==$> [text|
         Qux:
           q1: 1
           q2: True
@@ -717,5 +720,14 @@
 (==%>) :: HasCallStack => Text -> Text -> Expectation
 (==%>) = shouldBe
 
+-- the RHS has @neat-interpolation@ string for which later versions (>=0.4) 
are discarding the final
+-- newline; we must detect when it is doing so and restore the newline
+(==$>) :: HasCallStack => Builder -> Text -> Expectation
+(==$>) a b0 = a ==#> b
+  where
+    b = case T.last b0 == '\n' of
+      True  -> b0
+      False -> b0 <> "\n"
+
 (==#>) :: HasCallStack => Builder -> Text -> Expectation
 (==#>) a b = a `shouldBe` build (T.replace "_" " " b)

Reply via email to