@@ -198,7 +198,7 @@ instance Monad m => Monad (StreamT m) where
198198------------------------------------------------------------------------------
199199
200200instance Monad m => Applicative (StreamT m) where
201− pure = StreamT . yields
201+ pure a = StreamT $ scons a Nothing
202202 (<*>) = ap
203203
204204------------------------------------------------------------------------------
@@ -292,7 +292,7 @@ instance Monad m => Monad (InterleavedT m) where
292292------------------------------------------------------------------------------
293293
294294instance Monad m => Applicative (InterleavedT m) where
295− pure = InterleavedT . yields
295+ pure a = InterleavedT $ scons a Nothing
296296 (<*>) = ap
297297
298298------------------------------------------------------------------------------
@@ -403,7 +403,7 @@ instance MonadAsync m => Monad (AsyncT m) where
403403------------------------------------------------------------------------------
404404
405405instance MonadAsync m => Applicative (AsyncT m) where
406− pure = AsyncT . yields
406+ pure a = AsyncT $ scons a Nothing
407407 (<*>) = ap
408408
409409------------------------------------------------------------------------------
@@ -499,7 +499,7 @@ instance MonadAsync m => Monad (ParallelT m) where
499499------------------------------------------------------------------------------
500500
501501instance MonadAsync m => Applicative (ParallelT m) where
502− pure = ParallelT . yields
502+ pure a = ParallelT $ scons a Nothing
503503 (<*>) = ap
504504
505505------------------------------------------------------------------------------
@@ -566,7 +566,7 @@ zipWith f m1 m2 = fromStream $ go (toStream m1) (toStream m2)
566566 let yield2 b Nothing = yld (f a b) Nothing
567567 yield2 b (Just rb) = yld (f a b) (Just (go ra rb))
568568 in (runStream my) Nothing stp yield2
569− let yield1 a Nothing = merge a mempty
569+ let yield1 a Nothing = merge a snil
570570 yield1 a (Just ra) = merge a ra
571571 (runStream mx) Nothing stp yield1
572572
@@ -585,7 +585,7 @@ instance Monad m => Functor (ZipStream m) where
585585 in m Nothing stp yield
586586
587587instance Monad m => Applicative (ZipStream m) where
588− pure = ZipStream . yields
588+ pure a = ZipStream $ scons a Nothing
589589 (<*>) = zipWith id
590590
591591instance Streaming ZipStream where
@@ -660,7 +660,7 @@ instance Monad m => Functor (ZipAsync m) where
660660 in m Nothing stp yield
661661
662662instance MonadAsync m => Applicative (ZipAsync m) where
663− pure = ZipAsync . yields
663+ pure a = ZipAsync $ scons a Nothing
664664 (<*>) = zipAsyncWith id
665665
666666instance Streaming ZipAsync where
@@ -744,10 +744,10 @@ zippingAsync x = x
744744------------------------------------------------------------------------------
745745
746746cons :: (Streaming t) => a -> t m a -> t m a
747−cons a r = fromStream $ Stream $ \_ _ yld -> yld a (Just (toStream r))
747+cons a r = fromStream $ scons a (Just (toStream r))
748748
749749nil :: Streaming t => t m a
750−nil = fromStream $ Stream $ \_ stp _ -> stp
750+nil = fromStream $ snil
751751
752752-- | Build a stream from its church encoding. The function passed maps
753753-- directly to the underlying representation of the stream type. The second