Make minor cosmetic review changes for #571
commit287c3a3dc5574a5087aff18ac07cf663cbbef49e
authorHarendra Kumar <harendra@composewell.com>
dateTue 7 Jul 2020, 13:08 (6 years ago)
parent202f674
Changelog.md+2−2
@@ -2,8 +2,8 @@
22
33### Breaking changes
44
5−* Change the signature of `foldlM'` to ensure that the accumulator is
6− monadic.
5+* Change the signature of `foldlM'` to make the initial value of the
6+ accumulator monadic.
77
88### Bug Fixes
99
examples/WordCount.hs+1−2
@@ -603,8 +603,7 @@ countArray src = do
603603{-# INLINE wc_mwl_parallel #-}
604604wc_mwl_parallel :: Handle -> Int -> IO (V.IOVector Int)
605605wc_mwl_parallel src n = do
606− let counts = newCounts
607− S.foldlM' addCounts counts
606+ S.foldlM' addCounts newCounts
608607 $ S.aheadly
609608 $ S.maxThreads numCapabilities
610609 $ S.mapM (countArray)
src/Streamly/Internal/Memory/ArrayStream.hs+1−1
@@ -163,7 +163,7 @@ spliceArraysLenUnsafe len buffered = do
163163
164164 where
165165
166− writeArr dst Array{..} = do
166+ writeArr dst Array{..} =
167167 liftIO $ withForeignPtr aStart $ \src -> do
168168 let count = aEnd `minusPtr` src
169169 A.memcpy (castPtr dst) (castPtr src) count