export writeNAligned and unsafeIndex
commitbe43922fd466210283d26e64035db9970d1691fc
authorHarendra Kumar <harendra.kumar@gmail.com>
dateWed 20 Nov 2019, 16:42 (7 years ago)
parent291ff37
src/Streamly/Internal/Memory/Array.hs+2
@@ -57,6 +57,7 @@ module Streamly.Internal.Memory.Array
5757 -- Monadic APIs
5858 -- , newArray
5959 , A.writeN -- drop new
60+ , A.writeNAligned
6061 , A.write -- full buffer
6162 -- , writeLastN -- drop old (ring buffer)
6263
@@ -74,6 +75,7 @@ module Streamly.Internal.Memory.Array
7475 , last
7576 -- , (!!)
7677 , readIndex
78+ , A.unsafeIndex
7779 -- , readIndices
7880 -- , readRanges
7981
src/Streamly/Internal/Memory/Array/Types.hs+1−1
@@ -539,7 +539,7 @@ writeNAllocWith alloc n = Fold step initial extract
539539writeN :: forall m a. (MonadIO m, Storable a) => Int -> Fold m a (Array a)
540540writeN = writeNAllocWith newArray
541541
542−-- | @writeNAligned n@ folds a maximum of @n@ elements from the input
542+-- | @writeNAligned alignment n@ folds a maximum of @n@ elements from the input
543543-- stream to an 'Array' aligned to the given size.
544544--
545545-- /Internal/