on master help sign in
Add comments separating primitive/derived Unbox instances
commitc2775613162cfb9f3596eb5b0547b3d155c2dedb authorHarendra Kumar <harendra@composewell.com> dateThu 16 Feb 2023, 16:37 (4 years ago) parent3f803aa
1 file changed+8
core/src/Streamly/Internal/Data/Unboxed.hs+8
core/src/Streamly/Internal/Data/Unboxed.hs+8
@@ -323,6 +323,10 @@ instance _constraint Unbox _type where { \
323323; sizeOf _ = 2 * SIZE_OF(_innerType) \
324324}
325325
326+-------------------------------------------------------------------------------
327+-- Unbox instances for primitive types
328+-------------------------------------------------------------------------------
329+
326330DERIVE_UNBOXED( Char
327331 , C#
328332 , readWord8ArrayAsWideChar#
@@ -401,6 +405,10 @@ DERIVE_UNBOXED( Float
401405 , writeWord8ArrayAsFloat#
402406 , SIZEOF_HSFLOAT)
403407
408+-------------------------------------------------------------------------------
409+-- Unbox instances for derived types
410+-------------------------------------------------------------------------------
411+
404412DERIVE_UNBOXED( (StablePtr a)
405413 , StablePtr
406414 , readWord8ArrayAsStablePtr#