@@ -21,9 +21,9 @@
2121-- Higher level unboxed array modules "Streamly.Data.Array" and
2222-- "Streamly.Data.MutArray" are built on top of this module. Unboxed arrays are
2323-- essentially serialized Haskell values. Array modules provide higher level
24−-- serialization routines like 'Streamly.Data.Array.pinnedSerialize'
25−-- and 'Streamly.Data.Array.deserialize' from the
26−-- "Streamly.Data.Array" module.
24+-- serialization routines like 'Streamly.Internal.Data.Array.pinnedSerialize'
25+-- and 'Streamly.Internal.Data.Array.deserialize' from the
26+-- "Streamly.Internal.Data.Array" module.
2727--
2828-- == Mutable Byte Array
2929--
@@ -55,10 +55,19 @@
5555-- and then use the type class methods to serialize and deserialize to and from
5656-- a 'MutByteArray'.
5757--
58−-- See 'Streamly.Data.Array.pinnedSerialize' and
59−-- 'Streamly.Data.Array.deserialize' for 'Array' type based
58+-- See 'Streamly.Internal.Data.Array.pinnedSerialize' and
59+-- 'Streamly.Internal.Data.Array.deserialize' for 'Array' type based
6060-- serialization.
6161--
62+-- == Comparing serialized values
63+--
64+-- When using the `Unbox` type class the same value may result in differing
65+-- serialized bytes because of unused uninitialized data in case of sum types.
66+-- Therefore, byte comparison of serialized values is not reliable.
67+--
68+-- However, the 'Serialize' type class guarantees that the serialized values
69+-- are always exactly the same and byte comparison of serialized is reliable.
70+--
6271module Streamly.Data.MutByteArray
6372 (
6473