Skip to content

Commit 4b3d199

Browse files
committed
Deprecate chunksOf from Data.Stream module
1 parent 007fe33 commit 4b3d199

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

core/src/Streamly/Data/Stream.hs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,11 +665,6 @@ module Streamly.Data.Stream
665665
, runReaderT
666666
, runStateT
667667

668-
-- XXX Arrays could be different types, therefore, this should be in
669-
-- specific array module. Or maybe we should abstract over array types.
670-
-- * Stream of Arrays
671-
, Array.chunksOf
672-
673668
-- * Deprecated
674669
, scan
675670
, scanMaybe
@@ -679,6 +674,7 @@ module Streamly.Data.Stream
679674
, unfoldMany
680675
, intercalate
681676
, intercalateSuffix
677+
, chunksOf
682678
)
683679
where
684680

@@ -688,6 +684,15 @@ import Prelude
688684
mapM, scanl, sequence, reverse, iterate, foldr1, repeat, replicate,
689685
concatMap)
690686

687+
import Streamly.Internal.Data.Unbox (Unbox(..))
688+
import Control.Monad.IO.Class (MonadIO(..))
689+
691690
import qualified Streamly.Internal.Data.Array.Type as Array
692691

693692
#include "DocTestDataStream.hs"
693+
694+
{-# DEPRECATED chunksOf "Please use chunksOf from the Array module instead." #-}
695+
{-# INLINE chunksOf #-}
696+
chunksOf :: forall m a. (MonadIO m, Unbox a)
697+
=> Int -> Stream m a -> Stream m (Array.Array a)
698+
chunksOf = Array.chunksOf

0 commit comments

Comments
 (0)