on master help sign in
Rename Fold.lchunksOf to Fold.chunksOf
commit0753435d4665ffd1c580d5f1539be92bbe88d233 authorAdithya Kumar <adithya@composewell.com> dateFri 15 Jan 2021, 17:37 (6 years ago) parent9536cc7
10 files changed+16−16
benchmark/Streamly/Benchmark/FileSystem/Handle/ReadWrite.hs+1−1 benchmark/Streamly/Benchmark/Unicode/Stream.hs+2−2 src/Streamly/Internal/Data/Fold.hs+1−1 src/Streamly/Internal/Data/Fold/Types.hs+6−6 src/Streamly/Internal/FileSystem/Dir.hs+1−1 src/Streamly/Internal/FileSystem/File.hs+1−1 src/Streamly/Internal/FileSystem/Handle.hs+1−1 src/Streamly/Internal/Memory/ArrayStream.hs+1−1 src/Streamly/Internal/Network/Inet/TCP.hs+1−1 src/Streamly/Internal/Network/Socket.hs+1−1
benchmark/Streamly/Benchmark/FileSystem/Handle/ReadWrite.hs+1−1
@@ -85,7 +85,7 @@ inspect $ 'copyStream `hasNoType` ''Step -- S.unfold
8585inspect $ 'copyStream `hasNoType` ''IUF.ConcatState -- FH.read/UF.concat
8686inspect $ 'copyStream `hasNoType` ''A.ReadUState -- FH.read/A.read
8787inspect $ 'copyStream `hasNoType` ''AT.ArrayUnsafe -- FH.write/writeNUnsafe
88−inspect $ 'copyStream `hasNoType` ''Strict.Tuple3' -- FH.write/lchunksOf
88+inspect $ 'copyStream `hasNoType` ''Strict.Tuple3' -- FH.write/chunksOf
8989#endif
9090
9191o_1_space_copy_read :: BenchEnv -> [Benchmark]
benchmark/Streamly/Benchmark/Unicode/Stream.hs+2−2
@@ -203,7 +203,7 @@ inspect $ 'copyStreamLatin1' `hasNoType` ''Step
203203inspect $ 'copyStreamLatin1' `hasNoType` ''IUF.ConcatState -- FH.read/UF.concat
204204inspect $ 'copyStreamLatin1' `hasNoType` ''A.ReadUState -- FH.read/A.read
205205inspect $ 'copyStreamLatin1' `hasNoType` ''AT.ArrayUnsafe -- FH.write/writeNUnsafe
206−inspect $ 'copyStreamLatin1' `hasNoType` ''Strict.Tuple3' -- FH.write/lchunksOf
206+inspect $ 'copyStreamLatin1' `hasNoType` ''Strict.Tuple3' -- FH.write/chunksOf
207207#endif
208208
209209-- | Copy file (encodeLatin1)
@@ -220,7 +220,7 @@ inspect $ 'copyStreamLatin1 `hasNoType` ''Step
220220inspect $ 'copyStreamLatin1 `hasNoType` ''IUF.ConcatState -- FH.read/UF.concat
221221inspect $ 'copyStreamLatin1 `hasNoType` ''A.ReadUState -- FH.read/A.read
222222inspect $ 'copyStreamLatin1 `hasNoType` ''AT.ArrayUnsafe -- FH.write/writeNUnsafe
223−inspect $ 'copyStreamLatin1 `hasNoType` ''Strict.Tuple3' -- FH.write/lchunksOf
223+inspect $ 'copyStreamLatin1 `hasNoType` ''Strict.Tuple3' -- FH.write/chunksOf
224224#endif
225225
226226-- | Copy file
src/Streamly/Internal/Data/Fold.hs+1−1
@@ -214,7 +214,7 @@ module Streamly.Internal.Data.Fold
214214 -- * Nesting
215215 , many
216216 , lsessionsOf
217− , lchunksOf
217+ , chunksOf
218218 , chunksBetween
219219
220220 , concatSequence
src/Streamly/Internal/Data/Fold/Types.hs+6−6
@@ -202,7 +202,7 @@ module Streamly.Internal.Data.Fold.Types
202202 , concatMap
203203 , many
204204 , lsessionsOf
205− , lchunksOf
205+ , chunksOf
206206 , chunksOf2
207207
208208 , duplicate
@@ -861,19 +861,19 @@ many (Fold cstep cinitial cextract) (Fold sstep sinitial sextract) =
861861 Partial s -> cextract s
862862 Done b -> return b
863863
864−-- | @lchunksOf n split collect@ repeatedly applies the @split@ fold to chunks
864+-- | @chunksOf n split collect@ repeatedly applies the @split@ fold to chunks
865865-- of @n@ items in the input stream and supplies the result to the @collect@
866866-- fold.
867867--
868−-- > lchunksOf n split collect = many collect (takeLE n split)
868+-- > chunksOf n split collect = many collect (takeLE n split)
869869--
870870-- Stops when @collect@ stops.
871871--
872872-- /Internal/
873873--
874−{-# INLINE lchunksOf #-}
875−lchunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
876−lchunksOf n split collect = many collect (takeLE n split)
874+{-# INLINE chunksOf #-}
875+chunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
876+chunksOf n split collect = many collect (takeLE n split)
877877
878878{-# INLINE chunksOf2 #-}
879879chunksOf2 :: Monad m => Int -> Fold m a b -> Fold2 m x b c -> Fold2 m x a c
src/Streamly/Internal/FileSystem/Dir.hs+1−1
@@ -388,7 +388,7 @@ writeChunksWithBufferOf n h = lpackArraysChunksOf n (writeChunks h)
388388-- @since 0.7.0
389389{-# INLINE writeWithBufferOf #-}
390390writeWithBufferOf :: MonadIO m => Int -> Handle -> Fold m Word8 ()
391−writeWithBufferOf n h = FL.lchunksOf n (writeNUnsafe n) (writeChunks h)
391+writeWithBufferOf n h = FL.chunksOf n (writeNUnsafe n) (writeChunks h)
392392
393393-- > write = 'writeWithBufferOf' A.defaultChunkSize
394394--
src/Streamly/Internal/FileSystem/File.hs+1−1
@@ -377,7 +377,7 @@ writeChunks path = Fold step initial extract
377377writeWithBufferOf :: (MonadIO m, MonadCatch m)
378378 => Int -> FilePath -> Fold m Word8 ()
379379writeWithBufferOf n path =
380− FL.lchunksOf n (writeNUnsafe n) (writeChunks path)
380+ FL.chunksOf n (writeNUnsafe n) (writeChunks path)
381381
382382-- > write = 'writeWithBufferOf' A.defaultChunkSize
383383--
src/Streamly/Internal/FileSystem/Handle.hs+1−1
@@ -460,7 +460,7 @@ writeChunksWithBufferOf n h = lpackArraysChunksOf n (writeChunks h)
460460-- @since 0.7.0
461461{-# INLINE writeWithBufferOf #-}
462462writeWithBufferOf :: MonadIO m => Int -> Handle -> Fold m Word8 ()
463−writeWithBufferOf n h = FL.lchunksOf n (writeNUnsafe n) (writeChunks h)
463+writeWithBufferOf n h = FL.chunksOf n (writeNUnsafe n) (writeChunks h)
464464
465465{-# INLINE writeWithBufferOf2 #-}
466466writeWithBufferOf2 :: MonadIO m => Int -> Fold2 m Handle Word8 ()
src/Streamly/Internal/Memory/ArrayStream.hs+1−1
@@ -232,5 +232,5 @@ toArraysInRange low high (Fold step initial extract) =
232232{-# INLINE _toArraysOf #-}
233233_toArraysOf :: (MonadIO m, Storable a)
234234 => Int -> Fold m a (SerialT Identity (Array a))
235−_toArraysOf n = FL.lchunksOf n (A.writeNF n) FL.toStream
235+_toArraysOf n = FL.chunksOf n (A.writeNF n) FL.toStream
236236-}
src/Streamly/Internal/Network/Inet/TCP.hs+1−1
@@ -396,7 +396,7 @@ writeWithBufferOf
396396 -> PortNumber
397397 -> Fold m Word8 ()
398398writeWithBufferOf n addr port =
399− FL.lchunksOf n (writeNUnsafe n) (writeChunks addr port)
399+ FL.chunksOf n (writeNUnsafe n) (writeChunks addr port)
400400
401401-- | Write a stream to the supplied IPv4 host address and port number.
402402--
src/Streamly/Internal/Network/Socket.hs+1−1
@@ -503,7 +503,7 @@ fromBytesWithBufferOf n h m = fromChunks h $ AS.arraysOf n m
503503-- @since 0.7.0
504504{-# INLINE writeWithBufferOf #-}
505505writeWithBufferOf :: MonadIO m => Int -> Socket -> Fold m Word8 ()
506−writeWithBufferOf n h = FL.lchunksOf n (A.writeNUnsafe n) (writeChunks h)
506+writeWithBufferOf n h = FL.chunksOf n (A.writeNUnsafe n) (writeChunks h)
507507
508508-- > write = 'writeWithBufferOf' A.defaultChunkSize
509509--