packages feed

scientific 0.3.7.0 → 0.3.8.0

raw patch · 6 files changed

+23/−101 lines, 6 filesdep −bytestring-builderdep ~basedep ~binarydep ~bytestring

Dependencies removed: bytestring-builder

Dependency ranges changed: base, binary, bytestring, containers, deepseq, hashable, primitive, template-haskell

Files

scientific.cabal view
@@ -1,5 +1,5 @@ name:               scientific-version:            0.3.7.0+version:            0.3.8.0 synopsis:           Numbers represented using scientific notation description:   "Data.Scientific" provides the number type 'Scientific'. Scientific numbers are@@ -43,28 +43,20 @@ cabal-version:      >=1.10 extra-source-files: changelog tested-with:-  GHC ==7.6.3-   || ==7.8.4-   || ==7.10.3-   || ==8.0.2-   || ==8.2.2-   || ==8.4.4-   || ==8.6.5+  GHC ==8.6.5    || ==8.8.4-   || ==8.10.4-   || ==9.0.1+   || ==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 bytestring-builder-  description:-    Depend on the bytestring-builder package for backwards compatibility.--  default:     False-  manual:      False- flag integer-simple   description: Use the integer-simple package instead of integer-gmp   default:     False@@ -86,23 +78,16 @@    ghc-options:      -Wall   build-depends:-      base                >=4.5     && <4.16-    , binary              >=0.5.1   && <0.9-    , containers          >=0.4.2.1 && <0.7-    , deepseq             >=1.3.0.0 && <1.5-    , hashable            >=1.2.7.0 && <1.4-    , integer-logarithms  >=1.0.3.1 && <1.1-    , primitive           >=0.7.1.0 && <0.8-    , template-haskell    >=2.8     && <2.18-    , text                >=1.2.3.0 && <1.3--  if flag(bytestring-builder)-    build-depends:-        bytestring          >=0.9    && <0.10.4-      , bytestring-builder  >=0.10.4 && <0.11--  else-    build-depends: bytestring >=0.10.4 && <0.12+      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.5+    , 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@@ -120,7 +105,7 @@   if impl(ghc <8)     other-extensions: TemplateHaskell -  if impl(ghc >= 9.0)+  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@@ -137,6 +122,7 @@   build-depends:       base     , binary+    , bytestring     , QuickCheck        >=2.14.2     , scientific     , smallcheck        >=1.0@@ -145,14 +131,6 @@     , tasty-quickcheck  >=0.8     , tasty-smallcheck  >=0.2     , text--  if flag(bytestring-builder)-    build-depends:-        bytestring-      , bytestring-builder--  else-    build-depends: bytestring  benchmark bench-scientific   type:             exitcode-stdio-1.0
src/Data/ByteString/Builder/Scientific.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, OverloadedStrings, Safe #-}+{-# LANGUAGE OverloadedStrings, Safe #-}  module Data.ByteString.Builder.Scientific     ( scientificBuilder@@ -17,18 +17,7 @@  import Utils (roundTo, i2d) -#if !MIN_VERSION_base(4,8,0)-import Data.Monoid                  (mempty)-#endif--#if MIN_VERSION_base(4,5,0) import Data.Monoid                  ((<>))-#else-import Data.Monoid                  (Monoid, mappend)-(<>) :: Monoid a => a -> a -> a-(<>) = mappend-infixr 6 <>-#endif   -- | A @ByteString@ @Builder@ which renders a scientific number to full
src/Data/Scientific.hs view
@@ -1,17 +1,11 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE BangPatterns #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE PatternGuards #-} {-# LANGUAGE Trustworthy #-}--#if __GLASGOW_HASKELL__ >= 800 {-# LANGUAGE DeriveLift #-} {-# LANGUAGE StandaloneDeriving #-}-#else-{-# LANGUAGE TemplateHaskell #-}-#endif  -- | -- Module      :  Data.Scientific@@ -125,16 +119,6 @@ import           Text.ParserCombinators.ReadP     ( ReadP ) import           Data.Text.Lazy.Builder.RealFloat (FPFormat(..)) -#if !MIN_VERSION_base(4,9,0)-import           Control.Applicative          ((*>))-#endif--#if !MIN_VERSION_base(4,8,0)-import           Data.Functor                 ((<$>))-import           Data.Word                    (Word)-import           Control.Applicative          ((<*>))-#endif- import GHC.Integer.Compat (quotRemInteger, quotInteger, divInteger) import Utils              (maxExpt, roundTo, magnitude) @@ -191,14 +175,8 @@ -- Instances ---------------------------------------------------------------------- -#if __GLASGOW_HASKELL__ >= 800 -- | @since 0.3.7.0 deriving instance Lift Scientific-#else-instance Lift Scientific where-    lift (Scientific c e) = [| Scientific c e |]-#endif-  instance NFData Scientific where     rnf (Scientific _ _) = ()
src/Data/Text/Lazy/Builder/Scientific.hs view
@@ -1,4 +1,4 @@-{-# LANGUAGE CPP, OverloadedStrings, Safe #-}+{-# LANGUAGE OverloadedStrings, Safe #-}  module Data.Text.Lazy.Builder.Scientific     ( scientificBuilder@@ -16,14 +16,7 @@ import qualified Data.Text as T     (replicate) import Utils (roundTo, i2d) -#if MIN_VERSION_base(4,5,0) import Data.Monoid                  ((<>))-#else-import Data.Monoid                  (Monoid, mappend)-(<>) :: Monoid a => a -> a -> a-(<>) = mappend-infixr 6 <>-#endif  -- | A @Text@ @Builder@ which renders a scientific number to full -- precision, using standard decimal notation for arguments whose
src/Utils.hs view
@@ -17,11 +17,7 @@ import qualified Data.Primitive.Array as Primitive import           Control.Monad.ST             (runST) -#if MIN_VERSION_base(4,5,0) import           Data.Bits                    (unsafeShiftR)-#else-import           Data.Bits                    (shiftR)-#endif  roundTo :: Int -> [Int] -> (Int, [Int]) roundTo d is =@@ -71,11 +67,7 @@           where             xx = x * x             x  = Primitive.indexArray expts10 half-#if MIN_VERSION_base(4,5,0)             !half = ix `unsafeShiftR` 1-#else-            !half = ix `shiftR` 1-#endif     go 2  uninitialised :: error
test/test.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -10,9 +9,6 @@  module Main where -#if !MIN_VERSION_base(4,8,0)-import           Control.Applicative-#endif import           Control.Monad import           Data.Int import           Data.Word@@ -468,8 +464,4 @@ bigIntGen = QC.sized $ \size -> QC.resize (size * 1000) intGen  intGen :: QC.Gen Int-#if MIN_VERSION_QuickCheck(2,7,0) intGen = QC.arbitrary-#else-intGen = QC.sized $ \n -> QC.choose (-n, n)-#endif