[commit: packages/binary] master: Removed reinterpret-cast dependency. Embedded the code from this library instead. (93e3199)

git at git.haskell.org git at git.haskell.org
Sat Feb 4 21:17:35 UTC 2017


Repository : ssh://git@git.haskell.org/binary

On branch  : master
Link       : http://git.haskell.org/packages/binary.git/commitdiff/93e31997fb7b9e52627bc8af2a0a2b9f1ff7118f

>---------------------------------------------------------------

commit 93e31997fb7b9e52627bc8af2a0a2b9f1ff7118f
Author: Daniel Díaz <dhelta.diaz at gmail.com>
Date:   Fri May 27 12:07:14 2016 -0400

    Removed reinterpret-cast dependency. Embedded the code from this library instead.


>---------------------------------------------------------------

93e31997fb7b9e52627bc8af2a0a2b9f1ff7118f
 binary.cabal           | 23 +++++++++--------------
 src/Data/Binary/Get.hs |  2 +-
 src/Data/Binary/Put.hs |  2 +-
 3 files changed, 11 insertions(+), 16 deletions(-)

diff --git a/binary.cabal b/binary.cabal
index 5f2619b..9e5c577 100644
--- a/binary.cabal
+++ b/binary.cabal
@@ -31,7 +31,7 @@ source-repository head
   location: git://github.com/kolmodin/binary.git
 
 library
-  build-depends:   base >= 4.5.0.0 && < 5, bytestring >= 0.10.2, containers, array, reinterpret-cast
+  build-depends:   base >= 4.5.0.0 && < 5, bytestring >= 0.10.2, containers, array
   hs-source-dirs:  src
   exposed-modules: Data.Binary,
                    Data.Binary.Put,
@@ -41,7 +41,8 @@ library
 
   other-modules:   Data.Binary.Class,
                    Data.Binary.Internal,
-                   Data.Binary.Generic
+                   Data.Binary.Generic,
+                   Data.Binary.FloatCast
   if impl(ghc <= 7.6)
     -- prior to ghc-7.4 generics lived in ghc-prim
     build-depends: ghc-prim
@@ -69,8 +70,7 @@ test-suite qc
     random>=1.0.1.0,
     test-framework,
     test-framework-quickcheck2 >= 0.3,
-    QuickCheck>=2.8,
-    reinterpret-cast
+    QuickCheck>=2.8
 
   -- build dependencies from using binary source rather than depending on the library
   build-depends: array, containers
@@ -90,8 +90,7 @@ test-suite read-write-file
     Cabal,
     directory,
     filepath,
-    HUnit,
-    reinterpret-cast
+    HUnit
 
   -- build dependencies from using binary source rather than depending on the library
   build-depends: array, containers
@@ -108,8 +107,7 @@ benchmark bench
   other-modules: MemBench
   build-depends:
     base >= 4.5.0.0 && < 5,
-    bytestring,
-    reinterpret-cast
+    bytestring
   -- build dependencies from using binary source rather than depending on the library
   build-depends: array, containers
   c-sources: benchmarks/CBenchmark.c
@@ -131,8 +129,7 @@ benchmark get
     cereal,
     criterion == 1.*,
     deepseq,
-    mtl,
-    reinterpret-cast
+    mtl
   -- build dependencies from using binary source rather than depending on the library
   build-depends: array, containers
   ghc-options: -O2 -Wall
@@ -149,8 +146,7 @@ benchmark put
     base >= 4.5.0.0 && < 5,
     bytestring,
     criterion == 1.*,
-    deepseq,
-    reinterpret-cast
+    deepseq
   -- build dependencies from using binary source rather than depending on the library
   build-depends: array, containers
   ghc-options: -O2 -Wall
@@ -172,8 +168,7 @@ benchmark generics-bench
     tar,
     unordered-containers,
     zlib,
-    criterion,
-    reinterpret-cast
+    criterion
     
   other-modules:
     GenericsBenchCache
diff --git a/src/Data/Binary/Get.hs b/src/Data/Binary/Get.hs
index 3488f66..a5282d6 100644
--- a/src/Data/Binary/Get.hs
+++ b/src/Data/Binary/Get.hs
@@ -238,7 +238,7 @@ import GHC.Word
 #endif
 
 -- needed for casting words to float/double
-import Data.ReinterpretCast (wordToFloat, wordToDouble)
+import Data.Binary.FloatCast (wordToFloat, wordToDouble)
 
 -- $lazyinterface
 -- The lazy interface consumes a single lazy 'L.ByteString'. It's the easiest
diff --git a/src/Data/Binary/Put.hs b/src/Data/Binary/Put.hs
index 286161c..c403e17 100644
--- a/src/Data/Binary/Put.hs
+++ b/src/Data/Binary/Put.hs
@@ -101,7 +101,7 @@ import Control.Applicative
 import Prelude -- Silence AMP warning.
 
 -- needed for casting Floats/Doubles to words.
-import Data.ReinterpretCast (floatToWord, doubleToWord)
+import Data.Binary.FloatCast (floatToWord, doubleToWord)
 
 ------------------------------------------------------------------------
 



More information about the ghc-commits mailing list