packages feed

Decimal 0.2.2 → 0.2.3

raw patch · 3 files changed

+13/−3 lines, 3 filesdep +deepseqPVP ok

version bump matches the API change (PVP)

Dependencies added: deepseq

API changes (from Hackage documentation)

+ Data.Decimal: instance (Integral i, NFData i) => NFData (DecimalRaw i)

Files

Decimal.cabal view
@@ -1,5 +1,5 @@ Name:                Decimal-Version:             0.2.2+Version:             0.2.3 License:             BSD3 License-file:        LICENSE.txt Copyright:           Paul Johnson, 2011@@ -19,6 +19,7 @@ library    build-depends:                         base >= 4 && < 5,+                    deepseq,                     QuickCheck >= 2.4   hs-source-dirs:   src   if impl(ghc >= 7.0.0)@@ -35,7 +36,8 @@                    QuickCheck >= 2.4,                    test-framework >= 0.4.1,                    test-framework-quickcheck2,-                   test-framework-hunit+                   test-framework-hunit,+                   deepseq   ghc-options:     -Wall -rtsopts   hs-source-dirs:  src, src/Data, tests   -- The following lines trigger a bug in Hackage.  Uncommment for compilation on GHC 6.
README.txt view
@@ -42,3 +42,9 @@ -------------  Minor fixes to allow compilation under other versions of GHC.++Version 0.2.3+-------------++Added instance of NFData from Control.DeepSeq, and hence a dependency+on the deepseq package, thanks to Jeff Shaw (shawjef3 at msu.edu).
src/Data/Decimal.hs view
@@ -43,7 +43,7 @@    prop_signum ) where -+import Control.DeepSeq import Data.Char import Data.Ratio import Data.Word@@ -79,6 +79,8 @@ -- to and from @Integer@. type Decimal = DecimalRaw Integer +instance (Integral i, NFData i) => NFData (DecimalRaw i) where+    rnf (Decimal _ i) = rnf i  -- | Convert a real fractional value into a Decimal of the appropriate  -- precision.