packages feed

crackNum 1.9 → 2.0

raw patch · 3 files changed

+13/−8 lines, 3 filesdep ~basedep ~data-binary-ieee754PVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, data-binary-ieee754

API changes (from Hackage documentation)

Files

CHANGES.md view
@@ -1,7 +1,11 @@ * Hackage: <http://hackage.haskell.org/package/crackNum> * GitHub:  <http://github.com/LeventErkok/crackNum/> -* Latest Hackage released version: 1.9, 2017-01-22+* Latest Hackage released version: 2.0, 2018-03-17++### Version 2.0, 2018-03-17++  * Import FloatingHex qualified to avoid GHC 8.4.1 compilation issue  ### Version 1.9, 2017-01-22 
Data/Numbers/CrackNum.hs view
@@ -31,10 +31,11 @@ import Numeric import Numeric.IEEE import Data.Binary.IEEE754-import Data.Numbers.FloatingHex import Data.Numbers.CrackNum.Data import Data.Numbers.CrackNum.Utils +import qualified Data.Numbers.FloatingHex as FH+ -- | Crack a Haskell Integer value as the given precision floating value. The Integer should -- be the value corresponding to the bit-pattern as the float is laid out in memory according -- to the IEEE rules.@@ -134,9 +135,9 @@                       SP -> showGFloat Nothing (spVal dn expt fracBits) ""                       DP -> showGFloat Nothing (dpVal dn expt fracBits) ""                vh = case prec of-                      HP -> showHFloat         (spVal dn expt fracBits) ""-                      SP -> showHFloat         (spVal dn expt fracBits) ""-                      DP -> showHFloat         (dpVal dn expt fracBits) ""+                      HP -> FH.showHFloat      (spVal dn expt fracBits) ""+                      SP -> FH.showHFloat      (spVal dn expt fracBits) ""+                      DP -> FH.showHFloat      (dpVal dn expt fracBits) ""  -- | Show instance for FP instance Show FP where@@ -205,8 +206,8 @@                        (Nothing,     _,      Just d) -> (Nothing,            Just (doubleToFP d))                        _                             -> (Nothing,            Nothing) -        rd :: (Read a, FloatingHexReader a) => String -> Maybe a-        rd s = case [v | (v, "") <- reads s] ++ catMaybes [readHFloat s] of+        rd :: (Read a, FH.FloatingHexReader a) => String -> Maybe a+        rd s = case [v | (v, "") <- reads s] ++ catMaybes [FH.readHFloat s] of                  [v] -> Just v                  _   -> Nothing 
crackNum.cabal view
@@ -1,5 +1,5 @@ Name:                crackNum-Version:             1.9+Version:             2.0 Synopsis:            Crack various integer, floating-point data formats Description:         Crack HP, SP and DP floats and 8, 16, 32, 64 bit words and integers.                      .