Hello community,

here is the log from the commit of package ghc-scientific for openSUSE:Factory 
checked in at 2016-07-21 08:05:24
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-scientific (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-scientific.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-scientific"

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-scientific/ghc-scientific.changes    
2016-07-05 09:52:54.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-scientific.new/ghc-scientific.changes       
2016-07-21 08:05:29.000000000 +0200
@@ -1,0 +2,5 @@
+Sun Jul 10 16:58:33 UTC 2016 - psim...@suse.com
+
+- Update to version 0.3.4.8 revision 0 with cabal2obs.
+
+-------------------------------------------------------------------

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

Other differences:
------------------
++++++ ghc-scientific.spec ++++++
--- /var/tmp/diff_new_pack.HxDMuV/_old  2016-07-21 08:05:30.000000000 +0200
+++ /var/tmp/diff_new_pack.HxDMuV/_new  2016-07-21 08:05:30.000000000 +0200
@@ -17,66 +17,108 @@
 
 
 %global pkg_name scientific
-
-Name:           ghc-scientific
+%bcond_with tests
+Name:           ghc-%{pkg_name}
 Version:        0.3.4.8
 Release:        0
 Summary:        Numbers represented using scientific notation
 License:        BSD-3-Clause
 Group:          System/Libraries
-
-Url:            http://hackage.haskell.org/package/%{pkg_name}
-Source0:        
http://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
-
-BuildRequires:  fdupes
+Url:            https://hackage.haskell.org/package/%{pkg_name}
+Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
 BuildRequires:  ghc-Cabal-devel
-BuildRequires:  ghc-array-devel
+# Begin cabal-rpm deps:
+BuildRequires:  ghc-binary-devel
+BuildRequires:  ghc-bytestring-devel
+BuildRequires:  ghc-containers-devel
 BuildRequires:  ghc-deepseq-devel
 BuildRequires:  ghc-hashable-devel
 BuildRequires:  ghc-rpm-macros
 BuildRequires:  ghc-text-devel
 BuildRequires:  ghc-vector-devel
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
+%if %{with tests}
+BuildRequires:  ghc-QuickCheck-devel
+BuildRequires:  ghc-smallcheck-devel
+BuildRequires:  ghc-tasty-ant-xml-devel
+BuildRequires:  ghc-tasty-devel
+BuildRequires:  ghc-tasty-hunit-devel
+BuildRequires:  ghc-tasty-quickcheck-devel
+BuildRequires:  ghc-tasty-smallcheck-devel
+%endif
+# End cabal-rpm deps
 
 %description
-Data.Scientific provides a space efficient and arbitrary precision scientific
-number type.
-
-This package provides the Haskell %{pkg_name} libraries.
+'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  -n ghc-%{pkg_name}-devel
+%package devel
 Summary:        Haskell %{pkg_name} library development files
 Group:          Development/Libraries/Other
-Provides:       %{name}-static = %{version}-%{release}
 Requires:       %{name} = %{version}-%{release}
 Requires:       ghc-compiler = %{ghc_version}
+Requires(post): ghc-compiler = %{ghc_version}
+Requires(postun): ghc-compiler = %{ghc_version}
 
-%description  -n ghc-%{pkg_name}-devel
-Data.Scientific provides a space efficient and arbitrary precision scientific
-number type.
-
+%description devel
 This package provides the Haskell %{pkg_name} library development files.
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
 
+
 %build
 %ghc_lib_build
 
+
 %install
 %ghc_lib_install
 
-%post -n ghc-%{pkg_name}-devel
+
+%check
+%if %{with tests}
+%{cabal} test
+%endif
+
+
+%post devel
 %ghc_pkg_recache
 
-%postun -n ghc-%{pkg_name}-devel
+%postun devel
 %ghc_pkg_recache
 
-%files -f ghc-%{pkg_name}.files
-%defattr(-,root,root)
+%files -f %{name}.files
+%defattr(-,root,root,-)
 %doc LICENSE
 
-%files  -n ghc-%{pkg_name}-devel -f ghc-%{pkg_name}-devel.files
+%files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
+%doc changelog
 
 %changelog


Reply via email to