scientific 0.3.4.2 → 0.3.4.3
raw patch · 4 files changed
+31/−10 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- changelog +3/−0
- scientific.cabal +2/−1
- src/Data/Scientific.hs +3/−9
- src/GHC/Integer/Compat.hs +23/−0
changelog view
@@ -1,3 +1,6 @@+0.3.4.3+ * Fix build with integer-simple.+ 0.3.4.2 * Fix build on GHC-7.4. Courtesy of Adam Bergmark..
scientific.cabal view
@@ -1,5 +1,5 @@ name: scientific-version: 0.3.4.2+version: 0.3.4.3 synopsis: Numbers represented using scientific notation description: @Data.Scientific@ provides the number type 'Scientific'. Scientific numbers are@@ -64,6 +64,7 @@ Data.Text.Lazy.Builder.Scientific other-modules: Math.NumberTheory.Logarithms GHC.Integer.Logarithms.Compat+ GHC.Integer.Compat Utils other-extensions: DeriveDataTypeable, BangPatterns ghc-options: -Wall
src/Data/Scientific.hs view
@@ -123,16 +123,10 @@ import Data.Bits (shiftR) #endif -import GHC.Integer (quotRemInteger, quotInteger)--import Utils (roundTo)+import GHC.Integer (quotRemInteger, quotInteger)+import GHC.Integer.Compat (divInteger)+import Utils (roundTo) -#if MIN_VERSION_integer_gmp(0,5,1)-import GHC.Integer (divInteger)-#else-divInteger :: Integer -> Integer -> Integer-divInteger = div-#endif ---------------------------------------------------------------------- -- Type
+ src/GHC/Integer/Compat.hs view
@@ -0,0 +1,23 @@+{-# LANGUAGE CPP #-}++module GHC.Integer.Compat (divInteger) where++#ifdef MIN_VERSION_integer_simple++#if MIN_VERSION_integer_simple(0,1,1)+import GHC.Integer (divInteger)+#else+divInteger :: Integer -> Integer -> Integer+divInteger = div+#endif++#else++#if MIN_VERSION_integer_gmp(0,5,1)+import GHC.Integer (divInteger)+#else+divInteger :: Integer -> Integer -> Integer+divInteger = div+#endif++#endif