on master help sign in
Rename bracket3IO to bracketIO3
1ad9034Harendra Kumar
core/src/Streamly/Data/Stream.hs+1−1
@@ -453,7 +453,7 @@ module Streamly.Data.Stream
453 , afterIO
453 , afterIO
454 , finallyIO
454 , finallyIO
455 , bracketIO
455 , bracketIO
456− , bracket3IO
456+ , bracketIO3
457
457
458 -- * Transforming Inner Monad
458 -- * Transforming Inner Monad
459
459
core/src/Streamly/Internal/Data/Stream/Exception.hs+6−6
@@ -13,7 +13,7 @@ module Streamly.Internal.Data.Stream.Exception
13 , afterIO
13 , afterIO
14 , bracketUnsafe
14 , bracketUnsafe
15 , bracketIO
15 , bracketIO
16− , bracket3IO
16+ , bracketIO3
17 , onException
17 , onException
18 , finallyUnsafe
18 , finallyUnsafe
19 , finallyIO
19 , finallyIO
@@ -158,7 +158,7 @@ bracketUnsafe bef aft bet = fromStreamD $ D.bracket_ bef aft (toStreamD . bet)
158{-# INLINE bracketIO #-}
158{-# INLINE bracketIO #-}
159bracketIO :: (MonadIO m, MonadCatch m)
159bracketIO :: (MonadIO m, MonadCatch m)
160 => IO b -> (b -> IO c) -> (b -> Stream m a) -> Stream m a
160 => IO b -> (b -> IO c) -> (b -> Stream m a) -> Stream m a
161−bracketIO bef aft = bracket3IO bef aft aft aft
161+bracketIO bef aft = bracketIO3 bef aft aft aft
162
162
163-- For a use case of this see the "streamly-process" package. It needs to kill
163-- For a use case of this see the "streamly-process" package. It needs to kill
164-- the process in case of exception or garbage collection, but waits for the
164-- the process in case of exception or garbage collection, but waits for the
@@ -171,21 +171,21 @@ bracketIO bef aft = bracket3IO bef aft aft aft
171-- 2. When the stream is garbage collected
171-- 2. When the stream is garbage collected
172-- 3. When the stream encounters an exception
172-- 3. When the stream encounters an exception
173--
173--
174−-- @bracket3IO before onStop onGC onException action@ runs @action@ using the
174+-- @bracketIO3 before onStop onGC onException action@ runs @action@ using the
175-- result of @before@. If the stream stops, @onStop@ action is executed, if the
175-- result of @before@. If the stream stops, @onStop@ action is executed, if the
176-- stream is abandoned @onGC@ is executed, if the stream encounters an
176-- stream is abandoned @onGC@ is executed, if the stream encounters an
177-- exception @onException@ is executed.
177-- exception @onException@ is executed.
178--
178--
179-- /Pre-release/
179-- /Pre-release/
180−{-# INLINE bracket3IO #-}
180+{-# INLINE bracketIO3 #-}
181−bracket3IO :: (MonadIO m, MonadCatch m)
181+bracketIO3 :: (MonadIO m, MonadCatch m)
182 => IO b
182 => IO b
183 -> (b -> IO c)
183 -> (b -> IO c)
184 -> (b -> IO d)
184 -> (b -> IO d)
185 -> (b -> IO e)
185 -> (b -> IO e)
186 -> (b -> Stream m a)
186 -> (b -> Stream m a)
187 -> Stream m a
187 -> Stream m a
188−bracket3IO bef aft gc exc bet = fromStreamD $
188+bracketIO3 bef aft gc exc bet = fromStreamD $
189 D.bracket' bef aft exc gc (toStreamD . bet)
189 D.bracket' bef aft exc gc (toStreamD . bet)
190
190
191-- | Like 'handle' but the exception handler is also provided with the stream
191-- | Like 'handle' but the exception handler is also provided with the stream