summaryrefslogtreecommitdiff
path: root/src/runtime/haskell/Data/Binary.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/haskell/Data/Binary.hs')
-rw-r--r--src/runtime/haskell/Data/Binary.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/runtime/haskell/Data/Binary.hs b/src/runtime/haskell/Data/Binary.hs
index 786f5a09e..ab6fcc2a3 100644
--- a/src/runtime/haskell/Data/Binary.hs
+++ b/src/runtime/haskell/Data/Binary.hs
@@ -62,7 +62,7 @@ import Data.Word
import Data.Binary.Put
import Data.Binary.Get
-
+import Data.Binary.IEEE754 ( putFloat64be, getFloat64be)
import Control.Monad
import Control.Exception
import Foreign
@@ -747,9 +747,13 @@ instance (Binary e) => Binary (Seq.Seq e) where
------------------------------------------------------------------------
-- Floating point
+-- instance Binary Double where
+-- put d = put (decodeFloat d)
+-- get = liftM2 encodeFloat get get
+
instance Binary Double where
- put d = put (decodeFloat d)
- get = liftM2 encodeFloat get get
+ put = putFloat64be
+ get = getFloat64be
instance Binary Float where
put f = put (decodeFloat f)