crackNum 1.6 → 1.7
raw patch · 3 files changed
+10/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGES.md +5/−1
- Data/Numbers/CrackNum.hs +4/−4
- crackNum.cabal +1/−1
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.6, 2017-01-14+* Latest Hackage released version: 1.7, 2017-01-14++### Version 1.7, 2017-01-14++ * Fix a snafu in reading hexadecimal floats ### Version 1.6, 2017-01-14
Data/Numbers/CrackNum.hs view
@@ -26,7 +26,7 @@ import Data.Char (toLower) import Data.Int (Int8, Int16, Int32, Int64) import Data.List (intercalate)-import Data.Maybe (isJust, fromJust, fromMaybe)+import Data.Maybe (isJust, fromJust, fromMaybe, catMaybes) import Numeric import Numeric.IEEE@@ -206,9 +206,9 @@ _ -> (Nothing, Nothing) rd :: (Read a, RealFloat a) => String -> Maybe a- rd s = case reads s ++ [(v, "") | Just v <- [readHFloat s]] of- [(v, "")] -> Just v- _ -> Nothing+ rd s = case [v | (v, "") <- reads s] ++ catMaybes [readHFloat s] of+ [v] -> Just v+ _ -> Nothing -- | Turn a Haskell float to the internal detailed FP representation floatToFP :: Float -> FP
crackNum.cabal view
@@ -1,5 +1,5 @@ Name: crackNum-Version: 1.6+Version: 1.7 Synopsis: Crack various integer, floating-point data formats Description: Crack HP, SP and DP floats and 8, 16, 32, 64 bit words and integers. .