@@ -21,9 +21,9 @@
21-- Higher level unboxed array modules "Streamly.Data.Array" and
21-- Higher level unboxed array modules "Streamly.Data.Array" and
22-- "Streamly.Data.MutArray" are built on top of this module. Unboxed arrays are
22-- "Streamly.Data.MutArray" are built on top of this module. Unboxed arrays are
23-- essentially serialized Haskell values. Array modules provide higher level
23-- essentially serialized Haskell values. Array modules provide higher level
24−-- serialization routines like 'Streamly.Data.Array.pinnedSerialize'
24+-- serialization routines like 'Streamly.Internal.Data.Array.pinnedSerialize'
25−-- and 'Streamly.Data.Array.deserialize' from the
25+-- and 'Streamly.Internal.Data.Array.deserialize' from the
26−-- "Streamly.Data.Array" module.
26+-- "Streamly.Internal.Data.Array" module.
28-- == Mutable Byte Array
28-- == Mutable Byte Array
@@ -55,10 +55,19 @@
55-- and then use the type class methods to serialize and deserialize to and from
55-- and then use the type class methods to serialize and deserialize to and from
56-- a 'MutByteArray'.
56-- a 'MutByteArray'.
58−-- See 'Streamly.Data.Array.pinnedSerialize' and
58+-- See 'Streamly.Internal.Data.Array.pinnedSerialize' and
59−-- 'Streamly.Data.Array.deserialize' for 'Array' type based
59+-- 'Streamly.Internal.Data.Array.deserialize' for 'Array' type based
60-- serialization.
60-- serialization.
62+-- == Comparing serialized values
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.
68+-- However, the 'Serialize' type class guarantees that the serialized values
69+-- are always exactly the same and byte comparison of serialized is reliable.
62module Streamly.Data.MutByteArray
71module Streamly.Data.MutByteArray