Skip to content

Commit

Permalink
Deprecate chunksOf from Data.Stream module
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Dec 17, 2024
1 parent 007fe33 commit 4b3d199
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions core/src/Streamly/Data/Stream.hs
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,6 @@ module Streamly.Data.Stream
, runReaderT
, runStateT

-- XXX Arrays could be different types, therefore, this should be in
-- specific array module. Or maybe we should abstract over array types.
-- * Stream of Arrays
, Array.chunksOf

-- * Deprecated
, scan
, scanMaybe
Expand All @@ -679,6 +674,7 @@ module Streamly.Data.Stream
, unfoldMany
, intercalate
, intercalateSuffix
, chunksOf
)
where

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

import Streamly.Internal.Data.Unbox (Unbox(..))
import Control.Monad.IO.Class (MonadIO(..))

import qualified Streamly.Internal.Data.Array.Type as Array

#include "DocTestDataStream.hs"

{-# DEPRECATED chunksOf "Please use chunksOf from the Array module instead." #-}
{-# INLINE chunksOf #-}
chunksOf :: forall m a. (MonadIO m, Unbox a)
=> Int -> Stream m a -> Stream m (Array.Array a)
chunksOf = Array.chunksOf

0 comments on commit 4b3d199

Please sign in to comment.