on master help sign in
Add comments separating primitive/derived Unbox instances
c277561Harendra Kumar
core/src/Streamly/Internal/Data/Unboxed.hs+8
@@ -323,6 +323,10 @@ instance _constraint Unbox _type where { \
323; sizeOf _ = 2 * SIZE_OF(_innerType) \
323; sizeOf _ = 2 * SIZE_OF(_innerType) \
324}
324}
325
325
326+-------------------------------------------------------------------------------
327+-- Unbox instances for primitive types
328+-------------------------------------------------------------------------------
329+
326DERIVE_UNBOXED( Char
330DERIVE_UNBOXED( Char
327 , C#
331 , C#
328 , readWord8ArrayAsWideChar#
332 , readWord8ArrayAsWideChar#
@@ -401,6 +405,10 @@ DERIVE_UNBOXED( Float
401 , writeWord8ArrayAsFloat#
405 , writeWord8ArrayAsFloat#
402 , SIZEOF_HSFLOAT)
406 , SIZEOF_HSFLOAT)
403
407
408+-------------------------------------------------------------------------------
409+-- Unbox instances for derived types
410+-------------------------------------------------------------------------------
411+
404DERIVE_UNBOXED( (StablePtr a)
412DERIVE_UNBOXED( (StablePtr a)
405 , StablePtr
413 , StablePtr
406 , readWord8ArrayAsStablePtr#
414 , readWord8ArrayAsStablePtr#