Skip to content

Commit 4e74d81

Browse files
chessaiandrewthad
authored andcommitted
generalise the monadic action type of chain
1 parent ff8685d commit 4e74d81

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/Streaming/Prelude.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -533,13 +533,13 @@ breaks thus = loop where
533533
120 :> ()
534534
-}
535535

536-
chain :: Monad m => (a -> m ()) -> Stream (Of a) m r -> Stream (Of a) m r
536+
chain :: Monad m => (a -> m y) -> Stream (Of a) m r -> Stream (Of a) m r
537537
chain f = loop where
538538
loop str = case str of
539539
Return r -> return r
540540
Effect mn -> Effect (fmap loop mn)
541541
Step (a :> rest) -> Effect $ do
542-
f a
542+
_ <- f a
543543
return (Step (a :> loop rest))
544544
{-# INLINABLE chain #-}
545545

0 commit comments

Comments
 (0)