on master help sign in
Refactor unstreamShared to unStreamShared.
7c2b9b7Pranay Sashank
src/Streamly/Streams/Ahead.hs+2−2
@@ -48,7 +48,7 @@ import Streamly.Streams.SVar (fromSVar)
48import Streamly.Streams.Serial (map)
48import Streamly.Streams.Serial (map)
49import Streamly.SVar
49import Streamly.SVar
50import Streamly.Streams.StreamK
50import Streamly.Streams.StreamK
51− (IsStream(..), Stream(..), unstreamShared, unStreamIsolated,
51+ (IsStream(..), Stream(..), unStreamShared, unStreamIsolated,
52 runStreamSVar)
52 runStreamSVar)
53import qualified Streamly.Streams.StreamK as K
53import qualified Streamly.Streams.StreamK as K
54
54
@@ -683,7 +683,7 @@ aheadbind m f = go m
683 where
683 where
684 go (Stream g) =
684 go (Stream g) =
685 Stream $ \st stp sng yld ->
685 Stream $ \st stp sng yld ->
686− let runShared x = unstreamShared x st stp sng yld
686+ let runShared x = unStreamShared x st stp sng yld
687 runIsolated x = unStreamIsolated x st stp sng yld
687 runIsolated x = unStreamIsolated x st stp sng yld
688
688
689 single a = runIsolated $ f a
689 single a = runIsolated $ f a
src/Streamly/Streams/StreamK.hs+5−5
@@ -35,7 +35,7 @@ module Streamly.Streams.StreamK
35 , Stream (..)
35 , Stream (..)
36 , unStreamIsolated
36 , unStreamIsolated
37 , isolateStream
37 , isolateStream
38− , unstreamShared
38+ , unStreamShared
39 , runStreamSVar
39 , runStreamSVar
40
40
41 -- * Construction
41 -- * Construction
@@ -224,15 +224,15 @@ isolateStream x = Stream $ \st stp sng yld ->
224 unStreamIsolated x st stp sng yld
224 unStreamIsolated x st stp sng yld
225
225
226-- | Like unstream, but passes a shared SVar across continuations.
226-- | Like unstream, but passes a shared SVar across continuations.
227−{-# INLINE unstreamShared #-}
227+{-# INLINE unStreamShared #-}
228−unstreamShared ::
228+unStreamShared ::
229 Stream m a
229 Stream m a
230 -> State Stream m a -- state
230 -> State Stream m a -- state
231 -> m r -- stop
231 -> m r -- stop
232 -> (a -> m r) -- singleton
232 -> (a -> m r) -- singleton
233 -> (a -> Stream m a -> m r) -- yield
233 -> (a -> Stream m a -> m r) -- yield
234 -> m r
234 -> m r
235−unstreamShared = unStream
235+unStreamShared = unStream
236
236
237-- Run the stream using a run function associated with the SVar that runs the
237-- Run the stream using a run function associated with the SVar that runs the
238-- streams with a captured snapshot of the monadic state.
238-- streams with a captured snapshot of the monadic state.
@@ -1208,7 +1208,7 @@ bindWith par m f = go m
1208 where
1208 where
1209 go (Stream g) =
1209 go (Stream g) =
1210 Stream $ \st stp sng yld ->
1210 Stream $ \st stp sng yld ->
1211− let runShared x = unstreamShared x st stp sng yld
1211+ let runShared x = unStreamShared x st stp sng yld
1212 runIsolated x = unStreamIsolated x st stp sng yld
1212 runIsolated x = unStreamIsolated x st stp sng yld
1213
1213
1214 single a = runIsolated $ f a
1214 single a = runIsolated $ f a