@@ -447,7 +447,7 @@ fromListRev xs = unsafePerformIO $ unsafeFreeze <$> MA.fromListRev xs
447447-- allocated to size N, if the stream terminates before N elements then the
448448-- array may hold less than N elements.
449449--
450- -- >>> fromStreamN n = Stream.fold (Array.writeN n)
450+ -- >>> fromStreamN n = Stream.fold (Array.createOf n)
451451--
452452-- /Pre-release/
453453{-# INLINE_NORMAL fromStreamN #-}
@@ -466,7 +466,7 @@ fromStreamDN = fromStreamN
466466-- single array from a stream of unknown size. 'writeN' is at least twice
467467-- as efficient when the size is already known.
468468--
469- -- >>> fromStream = Stream.fold Array.write
469+ -- >>> fromStream = Stream.fold Array.create
470470--
471471-- Note that if the input stream is too large memory allocation for the array
472472-- may fail. When the stream size is not known, `chunksOf` followed by
@@ -502,7 +502,7 @@ bufferChunks = buildChunks
502502--
503503-- Same as the following but may be more efficient:
504504--
505- -- >>> chunksOf n = Stream.foldMany (Array.writeN n)
505+ -- >>> chunksOf n = Stream.foldMany (Array.createOf n)
506506--
507507-- /Pre-release/
508508{-# INLINE_NORMAL chunksOf #-}
@@ -550,7 +550,7 @@ chunksEndByLn' = chunksEndBy' (== fromIntegral (ord '\n'))
550550
551551-- | Convert a stream of arrays into a stream of their elements.
552552--
553- -- >>> concat = Stream.unfoldMany Array.reader
553+ -- >>> concat = Stream.unfoldEach Array.reader
554554--
555555{-# INLINE_NORMAL concat #-}
556556concat :: (Monad m , Unbox a ) => Stream m (Array a ) -> Stream m a
@@ -567,7 +567,7 @@ flattenArrays = concat
567567-- | Convert a stream of arrays into a stream of their elements reversing the
568568-- contents of each array before flattening.
569569--
570- -- >>> concatRev = Stream.unfoldMany Array.readerRev
570+ -- >>> concatRev = Stream.unfoldEach Array.readerRev
571571--
572572{-# INLINE_NORMAL concatRev #-}
573573concatRev :: forall m a . (Monad m , Unbox a )
@@ -591,7 +591,7 @@ flattenArraysRev = concatRev
591591-- arrays would have no capacity to append, therefore, a copy will be forced
592592-- anyway.
593593
594- -- | Fold @createCompactBySizeGE n@ coalesces adjacent arrays in the input
594+ -- | Fold @createCompactMin n@ coalesces adjacent arrays in the input
595595-- stream until the size becomes greater than or equal to n.
596596--
597597-- Generates unpinned arrays irrespective of the pinning status of input
@@ -618,7 +618,7 @@ fPinnedCompactGE = createCompactMin
618618-- | @compactBySize n stream@ coalesces adjacent arrays in the @stream@ until
619619-- the size becomes greater than or equal to @n@.
620620--
621- -- >>> compactBySize n = Stream.foldMany (Array.createCompactBySizeGE n)
621+ -- >>> compactBySize n = Stream.foldMany (Array.createCompactMin n)
622622--
623623-- Generates unpinned arrays irrespective of the pinning status of input
624624-- arrays.
@@ -633,7 +633,7 @@ RENAME(compactGE,compactMin)
633633
634634-- | Like 'compactBySizeGE' but for transforming folds instead of stream.
635635--
636- -- >>> lCompactBySizeGE n = Fold.many (Array.createCompactBySizeGE n)
636+ -- >>> lCompactBySizeGE n = Fold.many (Array.createCompactMin n)
637637--
638638-- Generates unpinned arrays irrespective of the pinning status of input
639639-- arrays.
@@ -987,7 +987,7 @@ pinnedWrite = pinnedCreate
987987-- could be unsafe and dangerous. This is dangerous especially when used with
988988-- foldMany like operations.
989989--
990- -- >>> unsafePureWrite = Array.unsafeMakePure Array.write
990+ -- >>> unsafePureWrite = Array.unsafeMakePure Array.create
991991--
992992{-# INLINE unsafeMakePure #-}
993993unsafeMakePure :: Monad m => Fold IO a b -> Fold m a b
0 commit comments