on master help sign in
hide lchunksOf and lsessionsOf
commitd3722602d1448945e5858d65de4f81ac319d0c3f authorHarendra Kumar <harendra.kumar@gmail.com> dateWed 31 Jul 2019, 03:27 (7 years ago) parent8ae20ba
2 files changed+11−9
src/Streamly/Fold.hs+8−8 src/Streamly/Mem/Array.hs+3−1
src/Streamly/Fold.hs+8−8
@@ -226,8 +226,8 @@ module Streamly.Fold
226226 , chunksOf
227227 , sessionsOf
228228
229− , lchunksOf
230− , lsessionsOf
229+ -- , lchunksOf
230+ -- , lsessionsOf
231231
232232 -- *** By Elements
233233 , splitBy
@@ -2292,9 +2292,9 @@ lchunksInRange low high (Fold step1 initial1 extract1)
22922292--
22932293-- @
22942294--
2295−{-# INLINE lchunksOf #-}
2296−lchunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
2297−lchunksOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
2295+{-# INLINE _lchunksOf #-}
2296+_lchunksOf :: Monad m => Int -> Fold m a b -> Fold m b c -> Fold m a c
2297+_lchunksOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
22982298 Fold step' initial' extract'
22992299
23002300 where
@@ -2326,9 +2326,9 @@ lchunksOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
23262326-- -----Fold m a b----|-Fold n a c-|-Fold n a c-|-...-|----Fold m a c
23272327--
23282328-- @
2329−{-# INLINE lsessionsOf #-}
2330−lsessionsOf :: MonadAsync m => Double -> Fold m a b -> Fold m b c -> Fold m a c
2331−lsessionsOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
2329+{-# INLINE _lsessionsOf #-}
2330+_lsessionsOf :: MonadAsync m => Double -> Fold m a b -> Fold m b c -> Fold m a c
2331+_lsessionsOf n (Fold step1 initial1 extract1) (Fold step2 initial2 extract2) =
23322332 Fold step' initial' extract'
23332333
23342334 where
src/Streamly/Mem/Array.hs+3−1
@@ -150,7 +150,7 @@ where
150150
151151import Control.Monad (when)
152152import Control.Monad.IO.Class (MonadIO(..))
153−import Data.Functor.Identity (Identity)
153+-- import Data.Functor.Identity (Identity)
154154import Data.Word (Word8)
155155import Foreign.ForeignPtr (withForeignPtr)
156156import Foreign.ForeignPtr.Unsafe (unsafeForeignPtrToPtr)
@@ -402,11 +402,13 @@ toArraysInRange :: (IsStream t, MonadIO m, Storable a)
402402toArraysInRange low high (Fold step initial extract) =
403403-}
404404
405+{-
405406-- | Fold the input to a pure buffered stream (List) of arrays.
406407{-# INLINE _toArraysOf #-}
407408_toArraysOf :: (MonadIO m, Storable a)
408409 => Int -> Fold m a (SerialT Identity (Array a))
409410_toArraysOf n = FL.lchunksOf n (A.toArrayN n) FL.toStream
411+-}
410412
411413-- XXX The realloc based implementation needs to make one extra copy if we use
412414-- shrinkToFit. On the other hand, the stream of arrays implementation may