MessagePack spec declares Int as [-(2^63-1), 2^64-1] and encodes negatives (< 0) and non-negatives (>= 0) differently.
data-msgpack implementation used Int64 to store both negative and positive values, which in result caused values > 2^63 to be encoded as negative values.
Your tests didn't fail because Word64 -> Int64 -> Word64 would convert just fine. But any other MessagePack implementations would read a negative value (or fail, if positive is expected).
MessagePack spec declares Int as
[-(2^63-1), 2^64-1]
and encodes negatives (< 0) and non-negatives (>= 0) differently.data-msgpack
implementation used Int64 to store both negative and positive values, which in result caused values > 2^63 to be encoded as negative values.Your tests didn't fail because Word64 -> Int64 -> Word64 would convert just fine. But any other MessagePack implementations would read a negative value (or fail, if positive is expected).
Fixes https://github.com/TokTok/hs-msgpack/issues/15.