on master help sign in
Remove chunksSplitOn from Data.Stream
de7a604Harendra Kumar
core/src/Streamly/Data/Stream.hs+2−16
@@ -511,15 +511,13 @@ module Streamly.Data.Stream
511 , runReaderT
511 , runReaderT
512 , runStateT
512 , runStateT
513
513
514+ -- XXX Arrays could be different types, therefore, this should be in
515+ -- specific array module. Or maybe we should abstract over array types.
514 -- * Stream of Arrays
516 -- * Stream of Arrays
515 , Array.chunksOf
517 , Array.chunksOf
516− , chunksSplitOn
517 )
518 )
518where
519where
519
520
520−import Control.Monad.IO.Class (MonadIO)
521−import Data.Word (Word8)
522−import Streamly.Data.Array (Array)
523import Streamly.Internal.Data.Stream
521import Streamly.Internal.Data.Stream
524import Prelude
522import Prelude
525 hiding (filter, drop, dropWhile, take, takeWhile, zipWith, foldr,
523 hiding (filter, drop, dropWhile, take, takeWhile, zipWith, foldr,
@@ -529,7 +527,6 @@ import Prelude
529 scanl, scanl1, repeat, replicate, concatMap, span)
527 scanl, scanl1, repeat, replicate, concatMap, span)
530
528
531import qualified Streamly.Internal.Data.Array.Type as Array
529import qualified Streamly.Internal.Data.Array.Type as Array
532−import qualified Streamly.Internal.Data.Stream.Chunked as ArrayStream
533
530
534#include "DocTestDataStream.hs"
531#include "DocTestDataStream.hs"
535
532
@@ -638,14 +635,3 @@ import qualified Streamly.Internal.Data.Stream.Chunked as ArrayStream
638--
635--
639-- 'Stream' and 'StreamK' types can be interconverted. See
636-- 'Stream' and 'StreamK' types can be interconverted. See
640-- "Streamly.Data.StreamK" module for conversion operations.
637-- "Streamly.Data.StreamK" module for conversion operations.
641−
642−-- | Split a stream of arrays on a given separator byte, dropping the separator
643−-- and coalescing all the arrays between two separators into a single array.
644−--
645−{-# INLINE chunksSplitOn #-}
646−chunksSplitOn
647− :: (MonadIO m)
648− => Word8
649− -> Stream m (Array Word8)
650− -> Stream m (Array Word8)
651−chunksSplitOn = ArrayStream.splitOn