composewell / streamly

High performance, concurrent functional programming abstractions
https://streamly.composewell.com
Other
861 stars 66 forks source link

Some fixes and updates to Array and Array stream modules #2651

Closed harendra-kumar closed 9 months ago

harendra-kumar commented 9 months ago
adithyaov commented 9 months ago

This is still nasty: https://github.com/composewell/streamly/blob/97657098d080bb3b54be94c2a2ead93e0a1f2fd3/core/src/Streamly/Internal/Data/MutByteArray/Type.hs#L115C1-L115C1

We can possibly return the updated pointer or the updated array. Or at least mention in the docs that this is nasty. Also the XXX comment can be removed as asUnpinnedPtrUnsafe is now implemented.