Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package ghc-formatting for openSUSE:Factory checked in at 2021-07-10 22:54:29 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-formatting (Old) and /work/SRC/openSUSE:Factory/.ghc-formatting.new.2625 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-formatting" Sat Jul 10 22:54:29 2021 rev:4 rq:905303 version:7.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-formatting/ghc-formatting.changes 2021-04-10 15:28:20.370446368 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-formatting.new.2625/ghc-formatting.changes 2021-07-10 22:54:59.943528600 +0200 @@ -1,0 +2,8 @@ +Thu Jul 1 12:51:58 UTC 2021 - [email protected] + +- Update formatting to version 7.1.3. + 7.1.3 + + * Fix the GHCJS build by not using `double-conversion`, as it relies on a native C library which obviously isn't available in GHCJS (it is still used in native builds). + +------------------------------------------------------------------- Old: ---- formatting-7.1.2.tar.gz New: ---- formatting-7.1.3.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-formatting.spec ++++++ --- /var/tmp/diff_new_pack.pC1Wtt/_old 2021-07-10 22:55:00.303525821 +0200 +++ /var/tmp/diff_new_pack.pC1Wtt/_new 2021-07-10 22:55:00.307525791 +0200 @@ -19,7 +19,7 @@ %global pkg_name formatting %bcond_with tests Name: ghc-%{pkg_name} -Version: 7.1.2 +Version: 7.1.3 Release: 0 Summary: Combinator-based type-safe formatting (like printf() or FORMAT) License: BSD-3-Clause ++++++ formatting-7.1.2.tar.gz -> formatting-7.1.3.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/formatting-7.1.2/CHANGELOG.md new/formatting-7.1.3/CHANGELOG.md --- old/formatting-7.1.2/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 +++ new/formatting-7.1.3/CHANGELOG.md 2001-09-09 03:46:40.000000000 +0200 @@ -1,3 +1,7 @@ +7.1.3 + +* Fix the GHCJS build by not using `double-conversion`, as it relies on a native C library which obviously isn't available in GHCJS (it is still used in native builds). + 7.1.2 * Removed direct dependency on integer-gmp, instead using very similar code from the `text` package. This changed the implementation of `build` for `Integer`, which results in better performance in some cases, and no performance degradation. See the benchmarking reports in bench/reports for more details. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/formatting-7.1.2/README.md new/formatting-7.1.3/README.md --- old/formatting-7.1.2/README.md 2001-09-09 03:46:40.000000000 +0200 +++ new/formatting-7.1.3/README.md 2001-09-09 03:46:40.000000000 +0200 @@ -534,7 +534,7 @@ From within your `nix-shell`, run `cabal bench`. To build the html benchmarking reports, run `cabal bench --benchmark-option=-obench/reports/7.2.0.html > bench/reports/7.2.0.txt`, replacing '7.2.0' with the current version. -This will output the file `bench.html` which you can open in a browser. +This will output the file `bench/reports/7.2.0.html` which you can open in a browser, and bench/reports/7.2.0.txt which you can view in a terminal or text editor. The benchmarks are in `bench/bench.hs`. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/formatting-7.1.2/formatting.cabal new/formatting-7.1.3/formatting.cabal --- old/formatting-7.1.2/formatting.cabal 2001-09-09 03:46:40.000000000 +0200 +++ new/formatting-7.1.3/formatting.cabal 2001-09-09 03:46:40.000000000 +0200 @@ -1,6 +1,6 @@ cabal-version: 2.4 name: formatting -version: 7.1.2 +version: 7.1.3 synopsis: Combinator-based type-safe formatting (like printf() or FORMAT) description: Combinator-based type-safe formatting (like printf() or FORMAT), modelled from the HoleyMonoids package. . @@ -54,11 +54,13 @@ hs-source-dirs: src build-depends: clock >= 0.4, - double-conversion ^>= 2.0.2.0, old-locale, scientific >= 0.3.0.0, time >= 1.5, transformers, + if !impl(ghcjs) + build-depends: + double-conversion ^>= 2.0.2.0, exposed-modules: Formatting Formatting.Formatters diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/formatting-7.1.2/src/Data/Text/Format.hs new/formatting-7.1.3/src/Data/Text/Format.hs --- old/formatting-7.1.2/src/Data/Text/Format.hs 2001-09-09 03:46:40.000000000 +0200 +++ new/formatting-7.1.3/src/Data/Text/Format.hs 2001-09-09 03:46:40.000000000 +0200 @@ -1,4 +1,5 @@ {-# LANGUAGE RelaxedPolyRec #-} +{-# LANGUAGE CPP #-} -- | -- Module : Data.Text.Format @@ -23,7 +24,11 @@ , shortest ) where -import Data.Double.Conversion.Text +#ifdef ghcjs_HOST_OS +import Text.Printf +#else +import Data.Double.Conversion.Text (toFixed, toShortest) +#endif import qualified Formatting.Buildable as B import Data.Text.Format.Types (Hex(..)) import qualified Data.Text.Lazy as LT @@ -48,13 +53,27 @@ Int -- ^ Number of digits of precision after the decimal. -> a -> Builder +#ifdef ghcjs_HOST_OS +fixed decs = fromString . toFixed . realToFrac + where + toFixed :: Double -> String + toFixed = printf ("%f." ++ show decs) +#else fixed decs = fromText . toFixed decs . realToFrac +#endif {-# NOINLINE[0] fixed #-} -- | Render a floating point number using the smallest number of -- digits that correctly represent it. shortest :: Real a => a -> Builder +#ifdef ghcjs_HOST_OS +shortest = fromString . toShortest . realToFrac + where + toShortest :: Double -> String + toShortest = printf "%f" +#else shortest = fromText . toShortest . realToFrac +#endif {-# INLINE shortest #-} -- | Render an integer using hexadecimal notation. (No leading "0x"
