pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/math/hs-scientific Update to scientific-0.3.6.2
details: https://anonhg.NetBSD.org/pkgsrc/rev/0ff118534b87
branches: trunk
changeset: 346396:0ff118534b87
user: pho <pho%pkgsrc.org@localhost>
date: Tue Dec 31 14:10:51 2019 +0000
description:
Update to scientific-0.3.6.2
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.
0.3.6.1
* Fix build on GHC < 8.
0.3.6.0
* 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.
0.3.5.3
* Dropped upper version bounds of dependencies because it's to much
work to maintain.
0.3.5.2
* Remove unused ghc-prim dependency.
* Added unit tests for read and scientificP
0.3.5.1
* Replace use of Vector from vector with Array from primitive.
0.3.5.0
* Export scientificP :: ReadP Scientific
(Courtesy of Shlok Datye @shlok)
0.3.4.15
* Fix build for base < 4.8.
0.3.4.14
* Some minor performance improvements.
0.3.4.13
* Support criterion-1.2
0.3.4.12
* Support base-4.10
0.3.4.11
* Support tasty-ant-xml-1.1.0
0.3.4.10
* Tighten lower bound on vector from 0.5 to 0.7 because building with
vector < 0.7 results in a build error.
* Move the internal modules Math.NumberTheory.Logarithms and
GHC.Integer.Logarithms.Compat to their own package
integer-logarithms so other people can share that code.
0.3.4.9
* Support QuickCheck-2.9.
0.3.4.8
* Make bytestring-builder's installation conditional based on a Cabal flag.
0.3.4.7
* Unconditionally export Data.ByteString.Builder.Scientific. The
bytestring-builder cabal flag has been removed. Depend on
bytestring-builder for backwards compatibility for GHC < 7.8.
0.3.4.6
* Made toDecimalDigits more similar to floatToDigits
Previously:
toDecimalDigits 0 == ([0],1)
Now:
toDecimalDigits 0 == ([0],0)
Because:
Numeric.floatToDigits 10 (0 :: Double) == ([0],0)
* Introduce a special case for 0 in fromFloatDigits
fromFloatDigits 0 = 0
This should fix https://github.com/bos/aeson/issues/369
0.3.4.5
* The following are all a courtesy of Oleg Grenrus (phadej):
* Support GHC-8.0.1
* Support binary-0.8
* Enable Travis continuous integration
0.3.4.4
* Improved performance of toDecimalDigits by 13%.
0.3.4.3
* Fix build with integer-simple.
0.3.4.2
* Fix build on GHC-7.4. Courtesy of Adam Bergmark..
0.3.4.1
* Fix build on GHC-7.0.4
0.3.4.0
* Added fromRationalRepetend & toRationalRepetend for safely
converting from and to rationals which have a repeating decimal
representation like:
1 % 28 = 0.03(571428).
* Added a Binary instance.
* Various performance improvements.
* Support vector-0.11
* Support tasty-0.11
* Support criterion-1.1.0.0
0.3.3.8
* Support QuickCheck-2.8.
0.3.3.7
* Fixed both the
Prelude Data.Scientific> reads "0.0" :: [(Data.Scientific.Scientific,String)]
[(0.0,".0"),(0.0,"")]
problem and the
read " 8" :: Scientific fails, while read " 8" :: Double succeeds
problem. Courtesy of neongreen.
0.3.3.6
* Fixed bug in the x / y method for Scientific. Since I was using the
default implementation: `x * recip y` the operation would diverge
when `recip y` had an infinite decimal output. This shouldn't happen
when the result of / is finite again. For example: 0.6 / 0.3 should
yield 2.0.
This is now fixed by using the following implementation:
`x / y = fromRational $ toRational x / toRational y`
diffstat:
math/hs-scientific/Makefile | 6 +++---
math/hs-scientific/PLIST | 26 --------------------------
math/hs-scientific/buildlink3.mk | 7 ++++---
math/hs-scientific/distinfo | 10 +++++-----
4 files changed, 12 insertions(+), 37 deletions(-)
diffs (88 lines):
diff -r d8b5756f7efb -r 0ff118534b87 math/hs-scientific/Makefile
--- a/math/hs-scientific/Makefile Tue Dec 31 14:05:03 2019 +0000
+++ b/math/hs-scientific/Makefile Tue Dec 31 14:10:51 2019 +0000
@@ -1,7 +1,6 @@
-# $NetBSD: Makefile,v 1.12 2016/01/10 11:49:10 szptvlfn Exp $
+# $NetBSD: Makefile,v 1.13 2019/12/31 14:10:51 pho Exp $
-DISTNAME= scientific-0.3.3.5
-PKGREVISION= 4
+DISTNAME= scientific-0.3.6.2
CATEGORIES= math
MAINTAINER= szptvlfn%NetBSD.org@localhost
@@ -11,4 +10,5 @@
.include "../../mk/haskell.mk"
.include "../../devel/hs-hashable/buildlink3.mk"
.include "../../devel/hs-text/buildlink3.mk"
+.include "../../math/hs-integer-logarithms/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
diff -r d8b5756f7efb -r 0ff118534b87 math/hs-scientific/PLIST
--- a/math/hs-scientific/PLIST Tue Dec 31 14:05:03 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2014/08/16 21:54:50 szptvlfn Exp $
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/Data/ByteString/Builder/Scientific.hi
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/Data/Scientific.hi
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/Data/Text/Lazy/Builder/Scientific.hi
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/HSscientific-${PKGVERSION}.o
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/Math/NumberTheory/Logarithms.hi
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/libHSscientific-${PKGVERSION}.a
-lib/scientific-${PKGVERSION}/${HASKELL_VERSION}/package-description
-share/doc/scientific-${PKGVERSION}/LICENSE
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/Data-ByteString-Builder-Scientific.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/Data-Scientific.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/Data-Text-Lazy-Builder-Scientific.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/doc-index.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/frames.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/haddock-util.js
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/hslogo-16.png
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/index-frames.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/index.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/mini_Data-ByteString-Builder-Scientific.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/mini_Data-Scientific.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/mini_Data-Text-Lazy-Builder-Scientific.html
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/minus.gif
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/ocean.css
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/plus.gif
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/scientific.haddock
-${PLIST.doc}share/doc/scientific-${PKGVERSION}/html/synopsis.png
diff -r d8b5756f7efb -r 0ff118534b87 math/hs-scientific/buildlink3.mk
--- a/math/hs-scientific/buildlink3.mk Tue Dec 31 14:05:03 2019 +0000
+++ b/math/hs-scientific/buildlink3.mk Tue Dec 31 14:10:51 2019 +0000
@@ -1,16 +1,17 @@
-# $NetBSD: buildlink3.mk,v 1.12 2016/01/10 11:49:10 szptvlfn Exp $
+# $NetBSD: buildlink3.mk,v 1.13 2019/12/31 14:10:51 pho Exp $
BUILDLINK_TREE+= hs-scientific
.if !defined(HS_SCIENTIFIC_BUILDLINK3_MK)
HS_SCIENTIFIC_BUILDLINK3_MK:=
-BUILDLINK_API_DEPENDS.hs-scientific+= hs-scientific>=0.3.3
-BUILDLINK_ABI_DEPENDS.hs-scientific+= hs-scientific>=0.3.3.5nb4
+BUILDLINK_API_DEPENDS.hs-scientific+= hs-scientific>=0.3.6
+BUILDLINK_ABI_DEPENDS.hs-scientific+= hs-scientific>=0.3.6.2
BUILDLINK_PKGSRCDIR.hs-scientific?= ../../math/hs-scientific
.include "../../devel/hs-hashable/buildlink3.mk"
.include "../../devel/hs-text/buildlink3.mk"
+.include "../../math/hs-integer-logarithms/buildlink3.mk"
.endif # HS_SCIENTIFIC_BUILDLINK3_MK
BUILDLINK_TREE+= -hs-scientific
diff -r d8b5756f7efb -r 0ff118534b87 math/hs-scientific/distinfo
--- a/math/hs-scientific/distinfo Tue Dec 31 14:05:03 2019 +0000
+++ b/math/hs-scientific/distinfo Tue Dec 31 14:10:51 2019 +0000
@@ -1,6 +1,6 @@
-$NetBSD: distinfo,v 1.6 2015/11/03 23:33:35 agc Exp $
+$NetBSD: distinfo,v 1.7 2019/12/31 14:10:51 pho Exp $
-SHA1 (scientific-0.3.3.5.tar.gz) = 5799028096dedde65dd0ea07b5c7d8ec9d7cacb1
-RMD160 (scientific-0.3.3.5.tar.gz) = 421d75491a252573079947c3578f66b73416dc0b
-SHA512 (scientific-0.3.3.5.tar.gz) = 29a87c20b8d6fd618de7bb35eb2d0b5ee6e2c2667b8ba5574e3a3abce90a23a49a2a7b3f8883fd6def7c701c0762d83ab80bffad142a9f9be636d98d1c56d102
-Size (scientific-0.3.3.5.tar.gz) = 18196 bytes
+SHA1 (scientific-0.3.6.2.tar.gz) = ae0dcfaf9f4087e6147d1acb69a7deb826b85702
+RMD160 (scientific-0.3.6.2.tar.gz) = 8dd3b320db88ed7a239197ec212e221c584ecfa3
+SHA512 (scientific-0.3.6.2.tar.gz) = 47a74524c8fb25d381adf868d823a6b6772f3f69b0b3cf9f9de015a03bc941857ef3fca1b4f8cbf23e998164e71a914e167221e753c6f32dc8644047d1ef57ee
+Size (scientific-0.3.6.2.tar.gz) = 23510 bytes
Home |
Main Index |
Thread Index |
Old Index