osc copypac from project:devel:languages:haskell:ghc-9.8.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=98
This commit is contained in:
commit
09819fbf6f
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
281
ghc-scientific.changes
Normal file
281
ghc-scientific.changes
Normal file
@ -0,0 +1,281 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 4 20:39:28 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.8.0 revision 1.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue May 14 10:23:19 UTC 2024 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.8.0.
|
||||
Upstream has not updated the file "changelog" since the last
|
||||
release.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 14 11:55:27 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 7.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 4 06:45:58 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 6.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 30 17:08:09 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Updated spec file to conform with ghc-rpm-macros-2.5.2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 12 09:49:32 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 5.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 21 10:26:01 UTC 2023 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 4.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 10 20:38:08 UTC 2022 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 3.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 31 15:06:36 UTC 2021 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 2.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 1 08:26:58 UTC 2021 - psimons@suse.com
|
||||
|
||||
- Update scientific to version 0.3.7.0 revision 1.
|
||||
Upstream has revised the Cabal build instructions on Hackage.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu May 20 19:46:12 UTC 2021 - psimons@suse.com
|
||||
|
||||
- Update scientific to version 0.3.7.0.
|
||||
0.3.7.0
|
||||
|
||||
* Make division (/) on Scientifics slightly more efficient.
|
||||
|
||||
* Fix the Show instance to surround negative numbers with parentheses when
|
||||
necessary.
|
||||
|
||||
* Add (Template Haskell) Lift Scientific instance
|
||||
|
||||
* Mark modules as Safe or Trustworthy (Safe Haskell).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 17 12:20:00 UTC 2020 - Ondřej Súkup <mimi.vx@gmail.com>
|
||||
|
||||
- disable %{ix86} build
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Aug 18 10:45:57 UTC 2020 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Replace %setup -q with the more modern %autosetup macro.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 16 11:14:34 UTC 2020 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Re-generate file with latest version of spec-cleaner.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 8 16:14:40 UTC 2019 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Drop obsolete group attributes.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 20 11:31:58 UTC 2018 - Peter Simons <psimons@suse.com>
|
||||
|
||||
- Use https URL to refer to bugs.opensuse.org.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jul 18 14:26:40 UTC 2018 - psimons@suse.com
|
||||
|
||||
- Cosmetic: replace tabs with blanks, strip trailing white space,
|
||||
and update copyright headers with spec-cleaner.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
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
|
||||
|
||||
- Update to version 0.3.5.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jul 3 03:01:36 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.15 revision 2.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Jun 12 09:41:44 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.15.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 31 14:01:07 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.13.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 19 13:31:57 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.12 with cabal2obs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 4 11:04:06 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.11 with cabal2obs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Feb 12 14:14:50 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.10 with cabal2obs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Jan 4 21:22:15 UTC 2017 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.9 revision 1 with cabal2obs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 22 06:03:20 UTC 2016 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.9 revision 0 with cabal2obs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 10 16:58:33 UTC 2016 - psimons@suse.com
|
||||
|
||||
- Update to version 0.3.4.8 revision 0 with cabal2obs.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jul 3 12:33:17 UTC 2016 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.3.4.8
|
||||
* Make bytestring-builder's installation conditional based on a Cabal flag.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 1 17:02:22 UTC 2016 - toddrme2178@gmail.com
|
||||
|
||||
- Make Group tag consistent with other GHC packages.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 12 12:00:17 UTC 2016 - mimi.vx@gmail.com
|
||||
|
||||
- update to 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.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 12 09:29:12 UTC 2016 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.3.4.6
|
||||
* Made toDecimalDigits more similar to floatToDigits
|
||||
* Introduce a special case for 0 in fromFloatDigits
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 10 09:00:33 UTC 2016 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.3.4.5
|
||||
* Support GHC-8.0.1
|
||||
* Support binary-0.8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Nov 29 17:39:11 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.3.4.4
|
||||
* Fix build with integer-simple.
|
||||
* Improved performance of toDecimalDigits by 13%.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Oct 12 18:53:43 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.3.4.2
|
||||
* build fixes
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Oct 4 16:52:33 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
- update to 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
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Apr 12 18:49:55 UTC 2015 - mimi.vx@gmail.com
|
||||
|
||||
- update to 0.3.3.8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Mar 29 09:47:51 UTC 2015 - mpluskal@suse.com
|
||||
|
||||
- Remove ExclusiveArch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Feb 2 18:00:30 UTC 2015 - mpluskal@suse.com
|
||||
|
||||
- Initial package
|
154
ghc-scientific.spec
Normal file
154
ghc-scientific.spec
Normal file
@ -0,0 +1,154 @@
|
||||
#
|
||||
# spec file for package ghc-scientific
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%global pkg_name scientific
|
||||
%global pkgver %{pkg_name}-%{version}
|
||||
%bcond_with tests
|
||||
Name: ghc-%{pkg_name}
|
||||
Version: 0.3.8.0
|
||||
Release: 0
|
||||
Summary: Numbers represented using scientific notation
|
||||
License: BSD-3-Clause
|
||||
URL: https://hackage.haskell.org/package/%{pkg_name}
|
||||
Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
|
||||
Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal
|
||||
BuildRequires: ghc-Cabal-devel
|
||||
BuildRequires: ghc-base-devel
|
||||
BuildRequires: ghc-base-prof
|
||||
BuildRequires: ghc-binary-devel
|
||||
BuildRequires: ghc-binary-prof
|
||||
BuildRequires: ghc-bytestring-devel
|
||||
BuildRequires: ghc-bytestring-prof
|
||||
BuildRequires: ghc-containers-devel
|
||||
BuildRequires: ghc-containers-prof
|
||||
BuildRequires: ghc-deepseq-devel
|
||||
BuildRequires: ghc-deepseq-prof
|
||||
BuildRequires: ghc-hashable-devel
|
||||
BuildRequires: ghc-hashable-prof
|
||||
BuildRequires: ghc-integer-logarithms-devel
|
||||
BuildRequires: ghc-integer-logarithms-prof
|
||||
BuildRequires: ghc-primitive-devel
|
||||
BuildRequires: ghc-primitive-prof
|
||||
BuildRequires: ghc-rpm-macros
|
||||
BuildRequires: ghc-template-haskell-devel
|
||||
BuildRequires: ghc-template-haskell-prof
|
||||
BuildRequires: ghc-text-devel
|
||||
BuildRequires: ghc-text-prof
|
||||
ExcludeArch: %{ix86}
|
||||
%if %{with tests}
|
||||
BuildRequires: ghc-QuickCheck-devel
|
||||
BuildRequires: ghc-QuickCheck-prof
|
||||
BuildRequires: ghc-smallcheck-devel
|
||||
BuildRequires: ghc-smallcheck-prof
|
||||
BuildRequires: ghc-tasty-devel
|
||||
BuildRequires: ghc-tasty-hunit-devel
|
||||
BuildRequires: ghc-tasty-hunit-prof
|
||||
BuildRequires: ghc-tasty-prof
|
||||
BuildRequires: ghc-tasty-quickcheck-devel
|
||||
BuildRequires: ghc-tasty-quickcheck-prof
|
||||
BuildRequires: ghc-tasty-smallcheck-devel
|
||||
BuildRequires: ghc-tasty-smallcheck-prof
|
||||
%endif
|
||||
|
||||
%description
|
||||
"Data.Scientific" provides the number type 'Scientific'. Scientific numbers are
|
||||
arbitrary precision and space efficient. They are represented using
|
||||
<http://en.wikipedia.org/wiki/Scientific_notation scientific notation>.
|
||||
The implementation uses a coefficient 'c :: 'Integer'' and a base-10 exponent
|
||||
'e :: 'Int''. A scientific number corresponds to the 'Fractional' number:
|
||||
''fromInteger' c * 10 '^^' e'.
|
||||
|
||||
Note that since we're using an 'Int' to represent the exponent these numbers
|
||||
aren't truly arbitrary precision. I intend to change the type of the exponent
|
||||
to 'Integer' in a future release.
|
||||
|
||||
The main application of 'Scientific' is to be used as the target of parsing
|
||||
arbitrary precision numbers coming from an untrusted source. The advantages
|
||||
over using 'Rational' for this are that:
|
||||
|
||||
* A 'Scientific' is more efficient to construct. Rational numbers need to be
|
||||
constructed using '%' which has to compute the 'gcd' of the 'numerator' and
|
||||
'denominator'.
|
||||
|
||||
* 'Scientific' is safe against numbers with huge exponents. For example:
|
||||
'1e1000000000 :: 'Rational'' will fill up all space and crash your program.
|
||||
Scientific works as expected:
|
||||
|
||||
>>> read "1e1000000000" :: Scientific 1.0e1000000000
|
||||
|
||||
* Also, the space usage of converting scientific numbers with huge exponents to
|
||||
''Integral's' (like: 'Int') or ''RealFloat's' (like: 'Double' or 'Float') will
|
||||
always be bounded by the target type.
|
||||
|
||||
%package devel
|
||||
Summary: Haskell %{pkg_name} library development files
|
||||
Requires: %{name} = %{version}-%{release}
|
||||
Requires: ghc-compiler = %{ghc_version}
|
||||
Requires(post): ghc-compiler = %{ghc_version}
|
||||
Requires(postun): ghc-compiler = %{ghc_version}
|
||||
|
||||
%description devel
|
||||
This package provides the Haskell %{pkg_name} library development files.
|
||||
|
||||
%package -n ghc-%{pkg_name}-doc
|
||||
Summary: Haskell %{pkg_name} library documentation
|
||||
Requires: ghc-filesystem
|
||||
BuildArch: noarch
|
||||
|
||||
%description -n ghc-%{pkg_name}-doc
|
||||
This package provides the Haskell %{pkg_name} library documentation.
|
||||
|
||||
%package -n ghc-%{pkg_name}-prof
|
||||
Summary: Haskell %{pkg_name} profiling library
|
||||
Requires: ghc-%{pkg_name}-devel = %{version}-%{release}
|
||||
Supplements: (ghc-%{pkg_name}-devel and ghc-prof)
|
||||
|
||||
%description -n ghc-%{pkg_name}-prof
|
||||
This package provides the Haskell %{pkg_name} profiling library.
|
||||
|
||||
%prep
|
||||
%autosetup -n %{pkg_name}-%{version}
|
||||
cp -p %{SOURCE1} %{pkg_name}.cabal
|
||||
|
||||
%build
|
||||
%ghc_lib_build
|
||||
|
||||
%install
|
||||
%ghc_lib_install
|
||||
|
||||
%check
|
||||
%cabal_test
|
||||
|
||||
%post devel
|
||||
%ghc_pkg_recache
|
||||
|
||||
%postun devel
|
||||
%ghc_pkg_recache
|
||||
|
||||
%files -f %{name}.files
|
||||
%license LICENSE
|
||||
|
||||
%files devel -f %{name}-devel.files
|
||||
%doc changelog
|
||||
|
||||
%files -n ghc-%{pkg_name}-doc -f ghc-%{pkg_name}-doc.files
|
||||
%license LICENSE
|
||||
|
||||
%files -n ghc-%{pkg_name}-prof -f ghc-%{pkg_name}-prof.files
|
||||
|
||||
%changelog
|
3
scientific-0.3.8.0.tar.gz
Normal file
3
scientific-0.3.8.0.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:13b343bca8aa26d7718e52e622e5a118056653edafcbc7ccc5333be7217218cf
|
||||
size 24314
|
145
scientific.cabal
Normal file
145
scientific.cabal
Normal file
@ -0,0 +1,145 @@
|
||||
name: scientific
|
||||
version: 0.3.8.0
|
||||
x-revision: 1
|
||||
synopsis: Numbers represented using scientific notation
|
||||
description:
|
||||
"Data.Scientific" provides the number type 'Scientific'. Scientific numbers are
|
||||
arbitrary precision and space efficient. They are represented using
|
||||
<http://en.wikipedia.org/wiki/Scientific_notation scientific notation>.
|
||||
The implementation uses a coefficient @c :: 'Integer'@ and a base-10 exponent
|
||||
@e :: 'Int'@. A scientific number corresponds to the
|
||||
'Fractional' number: @'fromInteger' c * 10 '^^' e@.
|
||||
.
|
||||
Note that since we're using an 'Int' to represent the exponent these numbers
|
||||
aren't truly arbitrary precision. I intend to change the type of the exponent
|
||||
to 'Integer' in a future release.
|
||||
.
|
||||
The main application of 'Scientific' is to be used as the target of parsing
|
||||
arbitrary precision numbers coming from an untrusted source. The advantages
|
||||
over using 'Rational' for this are that:
|
||||
.
|
||||
* A 'Scientific' is more efficient to construct. Rational numbers need to be
|
||||
constructed using '%' which has to compute the 'gcd' of the 'numerator' and
|
||||
'denominator'.
|
||||
.
|
||||
* 'Scientific' is safe against numbers with huge exponents. For example:
|
||||
@1e1000000000 :: 'Rational'@ will fill up all space and crash your
|
||||
program. Scientific works as expected:
|
||||
.
|
||||
>>> read "1e1000000000" :: Scientific
|
||||
1.0e1000000000
|
||||
.
|
||||
* Also, the space usage of converting scientific numbers with huge exponents to
|
||||
@'Integral's@ (like: 'Int') or @'RealFloat's@ (like: 'Double' or 'Float')
|
||||
will always be bounded by the target type.
|
||||
|
||||
homepage: https://github.com/basvandijk/scientific
|
||||
bug-reports: https://github.com/basvandijk/scientific/issues
|
||||
license: BSD3
|
||||
license-file: LICENSE
|
||||
author: Bas van Dijk
|
||||
maintainer: Bas van Dijk <v.dijk.bas@gmail.com>
|
||||
category: Data
|
||||
build-type: Simple
|
||||
cabal-version: >=1.10
|
||||
extra-source-files: changelog
|
||||
tested-with:
|
||||
GHC ==8.6.5
|
||||
|| ==8.8.4
|
||||
|| ==8.10.7
|
||||
|| ==9.0.2
|
||||
|| ==9.2.8
|
||||
|| ==9.4.8
|
||||
|| ==9.6.5
|
||||
|| ==9.8.2
|
||||
|| ==9.10.1
|
||||
|
||||
source-repository head
|
||||
type: git
|
||||
location: git://github.com/basvandijk/scientific.git
|
||||
|
||||
flag integer-simple
|
||||
description: Use the integer-simple package instead of integer-gmp
|
||||
default: False
|
||||
|
||||
library
|
||||
exposed-modules:
|
||||
Data.ByteString.Builder.Scientific
|
||||
Data.Scientific
|
||||
Data.Text.Lazy.Builder.Scientific
|
||||
|
||||
other-modules:
|
||||
GHC.Integer.Compat
|
||||
Utils
|
||||
|
||||
other-extensions:
|
||||
BangPatterns
|
||||
DeriveDataTypeable
|
||||
Trustworthy
|
||||
|
||||
ghc-options: -Wall
|
||||
build-depends:
|
||||
base >=4.5 && <4.21
|
||||
, binary >=0.8.6.0 && <0.9
|
||||
, bytestring >=0.10.8.2 && <0.13
|
||||
, containers >=0.6.0.1 && <0.8
|
||||
, deepseq >=1.4.4.0 && <1.6
|
||||
, hashable >=1.4.4.0 && <1.6
|
||||
, integer-logarithms >=1.0.3.1 && <1.1
|
||||
, primitive >=0.9.0.0 && <0.10
|
||||
, template-haskell >=2.14.0.0 && <2.23
|
||||
, text >=1.2.3.0 && <1.3 || >=2.0 && <2.2
|
||||
|
||||
if impl(ghc >=9.0)
|
||||
build-depends: base >=4.15
|
||||
|
||||
if flag(integer-simple)
|
||||
build-depends: invalid-cabal-flag-settings <0
|
||||
|
||||
else
|
||||
if flag(integer-simple)
|
||||
build-depends: integer-simple
|
||||
|
||||
else
|
||||
build-depends: integer-gmp
|
||||
|
||||
if impl(ghc <8)
|
||||
other-extensions: TemplateHaskell
|
||||
|
||||
if impl(ghc >=9.0)
|
||||
-- these flags may abort compilation with GHC-8.10
|
||||
-- https://gitlab.haskell.org/ghc/ghc/-/merge_requests/3295
|
||||
ghc-options: -Winferred-safe-imports -Wmissing-safe-haskell-mode
|
||||
|
||||
hs-source-dirs: src
|
||||
default-language: Haskell2010
|
||||
|
||||
test-suite test-scientific
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: test
|
||||
main-is: test.hs
|
||||
default-language: Haskell2010
|
||||
ghc-options: -Wall
|
||||
build-depends:
|
||||
base
|
||||
, binary
|
||||
, bytestring
|
||||
, QuickCheck >=2.14.2
|
||||
, scientific
|
||||
, smallcheck >=1.0
|
||||
, tasty >=1.4.0.1
|
||||
, tasty-hunit >=0.8
|
||||
, tasty-quickcheck >=0.8
|
||||
, tasty-smallcheck >=0.2
|
||||
, text
|
||||
|
||||
benchmark bench-scientific
|
||||
type: exitcode-stdio-1.0
|
||||
hs-source-dirs: bench
|
||||
main-is: bench.hs
|
||||
default-language: Haskell2010
|
||||
ghc-options: -O2
|
||||
build-depends:
|
||||
base
|
||||
, criterion >=0.5
|
||||
, scientific
|
Loading…
Reference in New Issue
Block a user