on master help sign in
Deprecate the Fold.Chunked module
9988559Harendra Kumar
core/src/Streamly/Internal/Data/Fold/Chunked.hs+10−9
@@ -6,7 +6,7 @@
6-- Stability : experimental
6-- Stability : experimental
7-- Portability : GHC
7-- Portability : GHC
8--
8--
9−-- Use "Streamly.Data.Parser.Chunked" instead.
9+-- Use "Streamly.Data.Parser" instead.
10--
10--
11-- Fold a stream of foreign arrays. @Fold m a b@ in this module works
11-- Fold a stream of foreign arrays. @Fold m a b@ in this module works
12-- on a stream of "Array a" and produces an output of type @b@.
12-- on a stream of "Array a" and produces an output of type @b@.
@@ -19,18 +19,19 @@
19-- folds in Data.Fold to correctly work on an array stream as if it is an
19-- folds in Data.Fold to correctly work on an array stream as if it is an
20-- element stream. For example:
20-- element stream. For example:
21--
21--
22−-- >>> import qualified Streamly.Data.Fold as Fold
22+-- >> import qualified Streamly.Data.Fold as Fold
23−-- >>> import qualified Streamly.Internal.Data.Stream.Chunked as ArrayStream
23+-- >> import qualified Streamly.Internal.Data.Array.Stream as ArrayStream
24−-- >>> import qualified Streamly.Internal.Data.Fold.Chunked as ChunkFold
24+-- >> import qualified Streamly.Internal.Data.Fold.Chunked as ChunkFold
25−-- >>> import qualified Streamly.Data.Stream as Stream
25+-- >> import qualified Streamly.Data.Stream as Stream
26−-- >>> import qualified Streamly.Data.StreamK as StreamK
26+-- >> import qualified Streamly.Data.StreamK as StreamK
27--
27--
28−-- >>> f = ChunkFold.fromFold (Fold.take 7 Fold.toList)
28+-- >> f = ChunkFold.fromFold (Fold.take 7 Fold.toList)
29−-- >>> s = Stream.chunksOf 5 $ Stream.fromList "hello world"
29+-- >> s = Stream.chunksOf 5 $ Stream.fromList "hello world"
30−-- >>> ArrayStream.runArrayFold f (StreamK.fromStream s)
30+-- >> ArrayStream.runArrayFold f (StreamK.fromStream s)
31-- Right "hello w"
31-- Right "hello w"
32--
32--
33module Streamly.Internal.Data.Fold.Chunked
33module Streamly.Internal.Data.Fold.Chunked
34+ {-# DEPRECATED "Please use Streamly.Data.Parser instead." #-}
34 (
35 (
35 ChunkFold (..)
36 ChunkFold (..)
36
37
core/src/Streamly/Internal/Data/Stream/Chunked.hs+1
@@ -1,3 +1,4 @@
1+{-# OPTIONS_GHC -Wno-deprecations #-}
1-- |
2-- |
2-- Module : Streamly.Internal.Data.Stream.Chunked
3-- Module : Streamly.Internal.Data.Stream.Chunked
3-- Copyright : (c) 2019 Composewell Technologies
4-- Copyright : (c) 2019 Composewell Technologies