Hello community,

here is the log from the commit of package ghc-crackNum for openSUSE:Factory 
checked in at 2017-04-13 10:45:12
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ghc-crackNum (Old)
 and      /work/SRC/openSUSE:Factory/.ghc-crackNum.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ghc-crackNum"

Thu Apr 13 10:45:12 2017 rev:2 rq:483131 version:1.9

Changes:
--------
--- /work/SRC/openSUSE:Factory/ghc-crackNum/ghc-crackNum.changes        
2017-03-28 15:20:03.643933750 +0200
+++ /work/SRC/openSUSE:Factory/.ghc-crackNum.new/ghc-crackNum.changes   
2017-04-13 10:45:14.647950426 +0200
@@ -1,0 +2,5 @@
+Sun Feb 12 14:15:54 UTC 2017 - psim...@suse.com
+
+- Update to version 1.9 with cabal2obs.
+
+-------------------------------------------------------------------

Old:
----
  1.cabal
  crackNum-1.5.tar.gz

New:
----
  crackNum-1.9.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ ghc-crackNum.spec ++++++
--- /var/tmp/diff_new_pack.Kh9Pyc/_old  2017-04-13 10:45:15.531825431 +0200
+++ /var/tmp/diff_new_pack.Kh9Pyc/_new  2017-04-13 10:45:15.535824865 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ghc-crackNum
 #
-# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,15 +18,15 @@
 
 %global pkg_name crackNum
 Name:           ghc-%{pkg_name}
-Version:        1.5
+Version:        1.9
 Release:        0
 Summary:        Crack various integer, floating-point data formats
 License:        BSD-3-Clause
 Group:          Development/Languages/Other
 Url:            https://hackage.haskell.org/package/%{pkg_name}
 Source0:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz
-Source1:        
https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal
 BuildRequires:  ghc-Cabal-devel
+BuildRequires:  ghc-FloatingHex-devel
 BuildRequires:  ghc-data-binary-ieee754-devel
 BuildRequires:  ghc-ieee754-devel
 BuildRequires:  ghc-rpm-macros
@@ -50,7 +50,6 @@
 
 %prep
 %setup -q -n %{pkg_name}-%{version}
-cp -p %{SOURCE1} %{pkg_name}.cabal
 
 %build
 %ghc_lib_build
@@ -71,6 +70,6 @@
 
 %files devel -f %{name}-devel.files
 %defattr(-,root,root,-)
-%doc README.md
+%doc CHANGES.md README.md
 
 %changelog

++++++ crackNum-1.5.tar.gz -> crackNum-1.9.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crackNum-1.5/CHANGES.md new/crackNum-1.9/CHANGES.md
--- old/crackNum-1.5/CHANGES.md 2016-01-23 17:53:18.000000000 +0100
+++ new/crackNum-1.9/CHANGES.md 2017-01-23 05:31:15.000000000 +0100
@@ -1,7 +1,27 @@
 * Hackage: <http://hackage.haskell.org/package/crackNum>
 * GitHub:  <http://github.com/LeventErkok/crackNum/>
 
-* Latest Hackage released version: 1.5, 2016-01-23
+* Latest Hackage released version: 1.9, 2017-01-22
+
+### Version 1.9, 2017-01-22
+
+  * Minor fix to printing of +/-0
+
+### Version 1.8, 2017-01-15
+
+  * Bump up FloatingHex dependency to >0.4, this enables
+    proper support for large doubles
+
+### Version 1.7, 2017-01-14
+
+  * Fix a snafu in reading hexadecimal floats
+
+### Version 1.6, 2017-01-14
+
+  * Add support for hexadecimal-floats. These now
+    work both in toIEEE option as input, and also
+    when printing the values out. (i.e., numbers
+    of the form 0x1.abp-3, etc.)
 
 ### Version 1.5, 2016-01-23
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crackNum-1.5/Data/Numbers/CrackNum/Main.hs 
new/crackNum-1.9/Data/Numbers/CrackNum/Main.hs
--- old/crackNum-1.5/Data/Numbers/CrackNum/Main.hs      2016-01-23 
17:53:18.000000000 +0100
+++ new/crackNum-1.9/Data/Numbers/CrackNum/Main.hs      2017-01-23 
05:31:15.000000000 +0100
@@ -82,6 +82,7 @@
               putStrLn "    Or, you can specify number of lanes with the -l 
option."
               putStrLn "  - For \"toIEEE\" option (case doesn't matter):"
               putStrLn "        - You can enter a number in decimal notation 
(like 2.3)"
+              putStrLn "        - You can enter a number in hexadecimal 
notation (like 0x1.abcp+3)"
               putStrLn "        - OR, enter one of the following:"
               putStrLn "               * infinity, -infinity: 
Positive/Negative infinities"
               putStrLn "               * nan, snan, qnan: Not-A-Number; 
signaling/quiet"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crackNum-1.5/Data/Numbers/CrackNum.hs 
new/crackNum-1.9/Data/Numbers/CrackNum.hs
--- old/crackNum-1.5/Data/Numbers/CrackNum.hs   2016-01-23 17:53:18.000000000 
+0100
+++ new/crackNum-1.9/Data/Numbers/CrackNum.hs   2017-01-23 05:31:15.000000000 
+0100
@@ -26,12 +26,12 @@
 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
 import Data.Binary.IEEE754
-
+import Data.Numbers.FloatingHex
 import Data.Numbers.CrackNum.Data
 import Data.Numbers.CrackNum.Utils
 
@@ -100,9 +100,11 @@
                 , "       Precision: " ++ show prec
                 , "            Sign: " ++ if sign then "Negative" else 
"Positive"
                 , "        Exponent: " ++ show expt ++ " (Stored: " ++ show 
stExpt ++ ", Bias: " ++ show bias ++ ")"
+                , "       Hex-float: " ++ hexVal
                 , "           Value: " ++ val
                 ]
              ++ [ "            Note: Representation for NaN's is not unique." 
| isNaNKind kind]
+
         (inds1, inds2, inds3) = case prec of
                                   HP -> (hpInds1, hpInds2, hpInds3)
                                   SP -> (spInds1, spInds2, spInds3)
@@ -112,20 +114,29 @@
                     SP -> [intVal `testBit` i | i <- startsAt 31]
                     DP -> [intVal `testBit` i | i <- startsAt 63]
             where startsAt n = [n, n-1 .. 0]
-        val = case kind of
-                Zero    False   -> "+0"
-                Zero    True    -> "-0"
-                Infty   False   -> "+Infinity"
-                Infty   True    -> "-Infinity"
-                SNaN            -> "NaN (Signaling)"
-                QNaN            -> "NaN (Quietized)"
-                Denormal        -> nval True  ++ " (DENORMAL)"
-                Normal          -> nval False ++ " (NORMAL)"
-        nval dn = (if sign then "-" else "+") ++ v
-         where v = case prec of
-                     HP -> showGFloat Nothing (spVal dn expt fracBits) ""
-                     SP -> showGFloat Nothing (spVal dn expt fracBits) ""
-                     DP -> showGFloat Nothing (dpVal dn expt fracBits) ""
+
+        dup x = (x, x)
+
+        (val, hexVal) = case kind of
+                          Zero    False   -> ("+0.0", "0x0p+0")
+                          Zero    True    -> ("-0.0", "-0x0p+0")
+                          Infty   False   -> dup "+Infinity"
+                          Infty   True    -> dup "-Infinity"
+                          SNaN            -> dup "NaN (Signaling)"
+                          QNaN            -> dup "NaN (Quietized)"
+                          Denormal        -> nval True  " (DENORMAL)"
+                          Normal          -> nval False " (NORMAL)"
+
+        nval dn tag = (s ++ vd ++ tag, s ++ vh)
+         where s = if sign then "-" else "+"
+               vd = case prec of
+                      HP -> showGFloat Nothing (spVal dn expt fracBits) ""
+                      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) ""
 
 -- | Show instance for FP
 instance Show FP where
@@ -187,12 +198,17 @@
                                     , ("qnan",      (integerToFP SP 
0x7fc00000, integerToFP DP 0x7ff8000000000000))
                                     ]
         mbF, mbD :: Maybe FP
-        (mbF, mbD) = case (i `lookup` specials, reads i, reads i) of
-                       (Just (f, d), _        , _        ) -> (Just f,         
Just d)
-                       (Nothing,     [(f, "")], [(d, "")]) -> (Just (floatToFP 
f),  Just (doubleToFP d))
-                       (Nothing,     [(f, "")], _        ) -> (Just (floatToFP 
f),  Nothing)
-                       (Nothing,     _,         [(d, "")]) -> (Nothing,        
Just (doubleToFP d))
-                       _                                   -> (Nothing,        
Nothing)
+        (mbF, mbD) = case (i `lookup` specials, rd i :: Maybe Float, rd i :: 
Maybe Double) of
+                       (Just (f, d), _     , _     ) -> (Just f,             
Just d)
+                       (Nothing,     Just f, Just d) -> (Just (floatToFP f), 
Just (doubleToFP d))
+                       (Nothing,     Just f, _     ) -> (Just (floatToFP f), 
Nothing)
+                       (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
+                 [v] -> Just v
+                 _   -> Nothing
 
 -- | Turn a Haskell float to the internal detailed FP representation
 floatToFP :: Float -> FP
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crackNum-1.5/INSTALL new/crackNum-1.9/INSTALL
--- old/crackNum-1.5/INSTALL    2016-01-23 17:53:18.000000000 +0100
+++ new/crackNum-1.9/INSTALL    2017-01-23 05:31:15.000000000 +0100
@@ -1,3 +1,3 @@
-The sbv library can be installed simply by issuing cabal install like this:
+The crackNum library can be installed simply by issuing cabal install like 
this:
 
-     cabal install IEEE754
+     cabal install crackNum
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crackNum-1.5/README.md new/crackNum-1.9/README.md
--- old/crackNum-1.5/README.md  2016-01-23 17:53:18.000000000 +0100
+++ new/crackNum-1.9/README.md  2017-01-23 05:31:15.000000000 +0100
@@ -5,7 +5,7 @@
 
 ### Command line options:
 
-    crackNum v1.5, (c) Levent Erkok. Released with a BSD3 license.
+    crackNum v1.9, (c) Levent Erkok. Released with a BSD3 license.
     Usage: crackNum precision bit/hex-pattern
               --hp        16 bit half     precision
               --sp        32 bit single   precision
@@ -42,6 +42,7 @@
         Or, you can specify number of lanes with the -l option.
       - For "toIEEE" option (case doesn't matter):
             - You can enter a number in decimal notation (like 2.3)
+            - You can enter a number in hexadecimal notation (like 0x1.abcp+3)
             - OR, enter one of the following:
                    * infinity, -infinity: Positive/Negative infinities
                    * nan, snan, qnan: Not-A-Number; signaling/quiet
@@ -65,6 +66,7 @@
            Precision: SP
                 Sign: Negative
             Exponent: 121 (Stored: 248, Bias: 127)
+           Hex-float: -0x1.015782p121
                Value: -2.6723903e36 (NORMAL)
     == Lane: 0 ==========================================
                       3  2          1         0
@@ -75,18 +77,20 @@
            Precision: SP
                 Sign: Positive
             Exponent: 128 (Stored: 255, Bias: 127)
+           Hex-float: NaN (Signaling)
                Value: NaN (Signaling)
                 Note: Representation for NaN's is not unique.
 
 ### Example: Encoding a float as a IEEE754 single-precision bit-pattern
 
     $ crackNum --sp --toIEEE=-2.3e6
-                3  2          1         0
-                1 09876543 21098765432109876543210
-                S ---E8--- ----------F23----------
-        Binary: 1 10010100 00011000110000110000000
-           Hex: CA0C 6180
-     Precision: SP
-          Sign: Negative
-      Exponent: 21 (Stored: 148, Bias: 127)
-         Value: -2300000.0 (NORMAL)
+                  3  2          1         0
+                  1 09876543 21098765432109876543210
+                  S ---E8--- ----------F23----------
+          Binary: 1 10010100 00011000110000110000000
+             Hex: CA0C 6180
+       Precision: SP
+            Sign: Negative
+        Exponent: 21 (Stored: 148, Bias: 127)
+       Hex-float: -0x1.18c3p21
+           Value: -2300000.0 (NORMAL)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/crackNum-1.5/crackNum.cabal 
new/crackNum-1.9/crackNum.cabal
--- old/crackNum-1.5/crackNum.cabal     2016-01-23 17:53:18.000000000 +0100
+++ new/crackNum-1.9/crackNum.cabal     2017-01-23 05:31:15.000000000 +0100
@@ -1,5 +1,5 @@
 Name:                crackNum
-Version:             1.5
+Version:             1.9
 Synopsis:            Crack various integer, floating-point data formats
 Description:         Crack HP, SP and DP floats and 8, 16, 32, 64 bit words 
and integers.
                      .
@@ -11,7 +11,7 @@
 Copyright:           Levent Erkok
 Category:            Tools
 Build-type:          Simple
-Cabal-version:       >= 1.14
+Cabal-version:       >= 1.10
 Extra-Source-Files:  INSTALL, README.md, COPYRIGHT, CHANGES.md
 
 source-repository head
@@ -22,7 +22,7 @@
    main-is      : Data/Numbers/CrackNum/Main.hs
    ghc-options  : -Wall
    default-language: Haskell2010
-   build-depends: base >= 4 && < 5, ieee754, data-binary-ieee754
+   build-depends: base >= 4 && < 5, ieee754, data-binary-ieee754, FloatingHex 
>= 0.4
    other-modules: Data.Numbers.CrackNum
                 , Data.Numbers.CrackNum.Utils
                 , Data.Numbers.CrackNum.Data
@@ -30,7 +30,7 @@
 Library
   ghc-options     : -Wall
   default-language: Haskell2010
-  Build-Depends   : base >= 4 && < 5, ieee754, data-binary-ieee754
+  Build-Depends   : base >= 4 && < 5, ieee754, data-binary-ieee754, 
FloatingHex >= 0.4
   Exposed-modules : Data.Numbers.CrackNum
   other-modules   : Data.Numbers.CrackNum.Utils
                   , Data.Numbers.CrackNum.Data


Reply via email to