@@ -580,14 +580,14 @@ workLoopAhead q heap st sv winfo = do
580580-- The only difference between forkSVarAsync and this is that we run the left
581581-- computation without a shared SVar.
582582forkSVarAhead :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
583−forkSVarAhead m1 m2 = mkStream $ \st stp sng yld -> do
583+forkSVarAhead m1 m2 = mkStream $ \st yld sng stp -> do
584584 sv <- newAheadVar st (concurrently (toStream m1) (toStream m2))
585585 workLoopAhead
586− foldStream st stp sng yld (fromSVar sv)
586+ foldStream st yld sng stp (fromSVar sv)
587587 where
588− concurrently ma mb = mkStream $ \st stp sng yld -> do
588+ concurrently ma mb = mkStream $ \st yld sng stp -> do
589589 liftIO $ enqueue (fromJust $ streamVar st) mb
590− foldStream st stp sng yld ma
590+ foldStream st yld sng stp ma
591591
592592-- | Polymorphic version of the 'Semigroup' operation '<>' of 'AheadT'.
593593-- Merges two streams sequentially but with concurrent lookahead.
@@ -595,15 +595,15 @@ forkSVarAhead m1 m2 = mkStream $ \st stp sng yld -> do
595595-- @since 0.3.0
596596{-# INLINE ahead #-}
597597ahead :: (IsStream t, MonadAsync m) => t m a -> t m a -> t m a
598−ahead m1 m2 = mkStream $ \st stp sng yld ->
598+ahead m1 m2 = mkStream $ \st yld sng stp ->
599599 case streamVar st of
600600 Just sv | svarStyle sv == AheadVar -> do
601601 liftIO $ enqueue sv (toStream m2)
602602 -- Always run the left side on a new SVar to avoid complexity in
603603 -- sequencing results. This means the left side cannot further
604604 -- split into more ahead computations on the same SVar.
605− foldStream st stp sng yld m1
606− _ -> foldStreamShared st stp sng yld (forkSVarAhead m1 m2)
605+ foldStream st yld sng stp m1
606+ _ -> foldStreamShared st yld sng stp (forkSVarAhead m1 m2)
607607
608608-- | XXX we can implement it more efficienty by directly implementing instead
609609-- of combining streams using ahead.