on master help sign in
Remove deprecated read/readRev routines

So that we can introduce these with different semantics in the next release.

commitd3247cf03a55af8dcf61bfbdbdb259d5213f1b44 authorHarendra Kumar <harendra@composewell.com> dateThu 23 Nov 2023, 00:59 (3 years ago) parent51a559d
3 files changed+2−71
core/src/Streamly/Console/Stdio.hs+1−27 core/src/Streamly/Data/Array.hs−19 core/src/Streamly/FileSystem/Handle.hs+1−25
core/src/Streamly/Console/Stdio.hs+1−27
@@ -24,33 +24,7 @@ module Streamly.Console.Stdio
2424 -- * Write (stderr)
2525 , writeErr
2626 , writeErrChunks
27−
28− -- * Deprecated
29− , read
30− , readChunks
3127 )
3228where
3329
34−import Control.Monad.IO.Class (MonadIO(..))
35−import Data.Word (Word8)
36−import Streamly.Internal.Data.Array.Type (Array)
37−import Streamly.Internal.Data.Unfold (Unfold)
38−
39−import Streamly.Internal.Console.Stdio hiding (read, readChunks)
40−import Prelude hiding (read)
41−
42−-- Same as 'reader'
43−--
44−-- @since 0.8.0
45−{-# DEPRECATED read "Please use 'reader' instead" #-}
46−{-# INLINE read #-}
47−read :: MonadIO m => Unfold m () Word8
48−read = reader
49−
50−-- Same as 'chunkReader'
51−--
52−-- @since 0.8.0
53−{-# DEPRECATED readChunks "Please use 'chunkReader' instead" #-}
54−{-# INLINE readChunks #-}
55−readChunks :: MonadIO m => Unfold m () (Array Word8)
56−readChunks = chunkReader
30+import Streamly.Internal.Console.Stdio
core/src/Streamly/Data/Array.hs−19
@@ -73,10 +73,6 @@ module Streamly.Data.Array
7373 , pin
7474 , unpin
7575 , isPinned
76−
77− -- * Deprecated
78− , read
79− , readRev
8076 )
8177where
8278
@@ -84,7 +80,6 @@ where
8480
8581import Streamly.Internal.Data.Array hiding (read, readRev)
8682import Streamly.Internal.Data.Unbox (Unbox (..))
87−import Streamly.Internal.Data.Unfold (Unfold)
8883
8984import Prelude hiding (read, length)
9085
@@ -150,17 +145,3 @@ import Prelude hiding (read, length)
150145-- This module is designed to be imported qualified:
151146--
152147-- >>> import qualified Streamly.Data.Array as Array
153−
154−-- | Same as 'reader'
155−--
156−{-# DEPRECATED read "Please use 'reader' instead" #-}
157−{-# INLINE_NORMAL read #-}
158−read :: (Monad m, Unbox a) => Unfold m (Array a) a
159−read = reader
160−
161−-- | Same as 'readerRev'
162−--
163−{-# DEPRECATED readRev "Please use 'readerRev' instead" #-}
164−{-# INLINE_NORMAL readRev #-}
165−readRev :: (Monad m, Unbox a) => Unfold m (Array a) a
166−readRev = readerRev
core/src/Streamly/FileSystem/Handle.hs+1−25
@@ -1,5 +1,4 @@
11{-# LANGUAGE CPP #-}
2−#include "inline.hs"
32
43-- |
54-- Module : Streamly.FileSystem.Handle
@@ -105,36 +104,13 @@ module Streamly.FileSystem.Handle
105104 , writeChunks
106105
107106 -- * Deprecated
108− , read
109107 , readWithBufferOf
110− , readChunks
111108 , readChunksWithBufferOf
112109 , writeChunksWithBufferOf
113110 , writeWithBufferOf
114111 )
115112where
116113
117−import Control.Monad.IO.Class (MonadIO(..))
118−import Data.Word (Word8)
119−import Streamly.Internal.Data.Array.Type (Array)
120−import Streamly.Internal.Data.Unfold.Type (Unfold)
121−import System.IO (Handle)
122−
123−import Streamly.Internal.FileSystem.Handle hiding (read, readChunks)
124−import Prelude hiding (read)
114+import Streamly.Internal.FileSystem.Handle
125115
126116#include "DocTestFileSystemHandle.hs"
127−
128−-- | Same as 'reader'
129−--
130−{-# DEPRECATED read "Please use 'reader' instead" #-}
131−{-# INLINE read #-}
132−read :: MonadIO m => Unfold m Handle Word8
133−read = reader
134−
135−-- | Same as 'chunkReader'
136−--
137−{-# DEPRECATED readChunks "Please use 'chunkReader' instead" #-}
138−{-# INLINE readChunks #-}
139−readChunks :: MonadIO m => Unfold m Handle (Array Word8)
140−readChunks = chunkReader