msgpack / msgpack-haskell

Haskell implementation of MessagePack / msgpack.org[Haskell]
http://hackage.haskell.org/package/msgpack
138 stars 80 forks source link

Packing single precision floating point number #37

Closed ghost closed 5 years ago

ghost commented 11 years ago

In the msgpack specification, prefix of "Float" type is 0xCA, but implementation of msgpack-haskell is 0xCB.

instance Packable Float where
  from f =
    fromWord8 0xCB <>
    fromWord32be (cast f)

http://wiki.msgpack.org/display/MSGPACK/Format+specification#Formatspecification-float

hvr commented 5 years ago

resolved by d6509c0f1cb4e2904fe662bebf198ad76f151746