File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -231,12 +231,8 @@ instance (Functor f, Monad m) => Functor (Stream f m) where
231231instance (Functor f , Monad m ) => Monad (Stream f m ) where
232232 return = Return
233233 {-# INLINE return #-}
234- stream1 >> stream2 = loop stream1 where
235- loop stream = case stream of
236- Return _ -> stream2
237- Effect m -> Effect (fmap loop m)
238- Step f -> Step (fmap loop f)
239- {-# INLINABLE (>>) #-}
234+ (>>) = (*>)
235+ {-# INLINE (>>) #-}
240236 -- (>>=) = _bind
241237 -- {-#INLINE (>>=) #-}
242238 --
@@ -281,6 +277,13 @@ instance (Functor f, Monad m) => Applicative (Stream f m) where
281277 {-# INLINE pure #-}
282278 streamf <*> streamx = do {f <- streamf; x <- streamx; return (f x)}
283279 {-# INLINE (<*>) #-}
280+ stream1 *> stream2 = loop stream1 where
281+ loop stream = case stream of
282+ Return _ -> stream2
283+ Effect m -> Effect (fmap loop m)
284+ Step f -> Step (fmap loop f)
285+ {-# INLINABLE (*>) #-}
286+
284287
285288{- | The 'Alternative' instance glues streams together stepwise.
286289
You can’t perform that action at this time.
0 commit comments