From 52e2510a61ddd188bd3b1f0bf9c9853320780e232e5b341a921da0bfdfa43652 Mon Sep 17 00:00:00 2001 From: Peter Simons Date: Tue, 15 May 2018 18:24:34 +0000 Subject: [PATCH] osc copypac from project:devel:languages:haskell:ghc-8.4.x package:ghc-scientific revision:3, using keep-link OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc-scientific?expand=0&rev=58 --- ghc-scientific.changes | 51 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/ghc-scientific.changes b/ghc-scientific.changes index df50dfc..aec740c 100644 --- a/ghc-scientific.changes +++ b/ghc-scientific.changes @@ -1,3 +1,54 @@ +------------------------------------------------------------------- +Mon May 14 17:02:11 UTC 2018 - psimons@suse.com + +- Update scientific to version 0.3.6.2. + * Due to a regression introduced in 0.3.4.14 the RealFrac methods + and floatingOrInteger became vulnerable to a space blowup when + applied to scientifics with huge exponents. This has now been + fixed again. + + * Fix build on GHC < 8. + + * Make the methods of the Hashable, Eq and Ord instances safe to + use when applied to scientific numbers coming from untrusted + sources. Previously these methods first converted their arguments + to Rational before applying the operation. This is unsafe because + converting a Scientific to a Rational could fill up all space and + crash your program when the Scientific has a huge base10Exponent. + + Do note that the hash computation of the Hashable Scientific + instance has been changed because of this improvement! + + Thanks to Tom Sydney Kerckhove (@NorfairKing) for pushing me to + fix this. + + * fromRational :: Rational -> Scientific now throws an error + instead of diverging when applied to a repeating decimal. This + does mean it will consume space linear in the number of digits of + the resulting scientific. This makes "fromRational" and the other + Fractional methods "recip" and "/" a bit safer to use. + + * To get the old unsafe but more efficient behaviour the following + function was added: unsafeFromRational :: Rational -> Scientific. + + * Add alternatives for fromRationalRepetend: + + fromRationalRepetendLimited + :: Int -- ^ limit + -> Rational + -> Either (Scientific, Rational) + (Scientific, Maybe Int) + + and: + + fromRationalRepetendUnlimited + :: Rational -> (Scientific, Maybe Int) + + Thanks to Ian Jeffries (@seagreen) for the idea. + + * Dropped upper version bounds of dependencies + because it's to much work to maintain. + ------------------------------------------------------------------- Tue Jul 11 03:02:20 UTC 2017 - psimons@suse.com