-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Backport ieee754 float double combinators to older binary -- -- Backport ieee754 float double combinators to older binary @package binary-ieee754 @version 0.1.0.0 -- | This module backports ieee754 double/float combinators from binary -- 0.8.4 to older version, and simply re-export these combinators for -- binary >= 0.8.4. You can safely import this module alongside -- Data.Binary.Get and Data.Binary.Put. -- -- Implements casting via a 1-elemnt STUArray, as described in -- http://stackoverflow.com/a/7002812/263061. module Data.Binary.IEEE754 -- | Reinterpret-casts a Float to a Word32. floatToWord :: Float -> Word32 -- | Reinterpret-casts a Word32 to a Float. wordToFloat :: Word32 -> Float -- | Reinterpret-casts a Double to a Word64. doubleToWord :: Double -> Word64 -- | Reinterpret-casts a Word64 to a Double. wordToDouble :: Word64 -> Double getFloatbe :: Get Float getFloatle :: Get Float getFloathost :: Get Float getDoublebe :: Get Double getDoublele :: Get Double getDoublehost :: Get Double putFloatbe :: Float -> Put putFloatle :: Float -> Put putFloathost :: Float -> Put putDoublebe :: Double -> Put putDoublele :: Double -> Put putDoublehost :: Double -> Put