@@ -198,7 +198,7 @@ instance Monad m => Monad (StreamT m) where
198------------------------------------------------------------------------------
198------------------------------------------------------------------------------
200instance Monad m => Applicative (StreamT m) where
200instance Monad m => Applicative (StreamT m) where
201− pure = StreamT . yields
201+ pure a = StreamT $ scons a Nothing
202 (<*>) = ap
202 (<*>) = ap
204------------------------------------------------------------------------------
204------------------------------------------------------------------------------
@@ -292,7 +292,7 @@ instance Monad m => Monad (InterleavedT m) where
292------------------------------------------------------------------------------
292------------------------------------------------------------------------------
294instance Monad m => Applicative (InterleavedT m) where
294instance Monad m => Applicative (InterleavedT m) where
295− pure = InterleavedT . yields
295+ pure a = InterleavedT $ scons a Nothing
296 (<*>) = ap
296 (<*>) = ap
298------------------------------------------------------------------------------
298------------------------------------------------------------------------------
@@ -403,7 +403,7 @@ instance MonadAsync m => Monad (AsyncT m) where
403------------------------------------------------------------------------------
403------------------------------------------------------------------------------
405instance MonadAsync m => Applicative (AsyncT m) where
405instance MonadAsync m => Applicative (AsyncT m) where
406− pure = AsyncT . yields
406+ pure a = AsyncT $ scons a Nothing
407 (<*>) = ap
407 (<*>) = ap
409------------------------------------------------------------------------------
409------------------------------------------------------------------------------
@@ -499,7 +499,7 @@ instance MonadAsync m => Monad (ParallelT m) where
499------------------------------------------------------------------------------
499------------------------------------------------------------------------------
501instance MonadAsync m => Applicative (ParallelT m) where
501instance MonadAsync m => Applicative (ParallelT m) where
502− pure = ParallelT . yields
502+ pure a = ParallelT $ scons a Nothing
503 (<*>) = ap
503 (<*>) = ap
505------------------------------------------------------------------------------
505------------------------------------------------------------------------------
@@ -566,7 +566,7 @@ zipWith f m1 m2 = fromStream $ go (toStream m1) (toStream m2)
566 let yield2 b Nothing = yld (f a b) Nothing
566 let yield2 b Nothing = yld (f a b) Nothing
567 yield2 b (Just rb) = yld (f a b) (Just (go ra rb))
567 yield2 b (Just rb) = yld (f a b) (Just (go ra rb))
568 in (runStream my) Nothing stp yield2
568 in (runStream my) Nothing stp yield2
569− let yield1 a Nothing = merge a mempty
569+ let yield1 a Nothing = merge a snil
570 yield1 a (Just ra) = merge a ra
570 yield1 a (Just ra) = merge a ra
571 (runStream mx) Nothing stp yield1
571 (runStream mx) Nothing stp yield1
@@ -585,7 +585,7 @@ instance Monad m => Functor (ZipStream m) where
585 in m Nothing stp yield
585 in m Nothing stp yield
587instance Monad m => Applicative (ZipStream m) where
587instance Monad m => Applicative (ZipStream m) where
588− pure = ZipStream . yields
588+ pure a = ZipStream $ scons a Nothing
589 (<*>) = zipWith id
589 (<*>) = zipWith id
591instance Streaming ZipStream where
591instance Streaming ZipStream where
@@ -660,7 +660,7 @@ instance Monad m => Functor (ZipAsync m) where
660 in m Nothing stp yield
660 in m Nothing stp yield
662instance MonadAsync m => Applicative (ZipAsync m) where
662instance MonadAsync m => Applicative (ZipAsync m) where
663− pure = ZipAsync . yields
663+ pure a = ZipAsync $ scons a Nothing
664 (<*>) = zipAsyncWith id
664 (<*>) = zipAsyncWith id
666instance Streaming ZipAsync where
666instance Streaming ZipAsync where
@@ -744,10 +744,10 @@ zippingAsync x = x
744------------------------------------------------------------------------------
744------------------------------------------------------------------------------
746cons :: (Streaming t) => a -> t m a -> t m a
746cons :: (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))
749nil :: Streaming t => t m a
749nil :: Streaming t => t m a
750−nil = fromStream $ Stream $ \_ stp _ -> stp
750+nil = fromStream $ snil
752-- | Build a stream from its church encoding. The function passed maps
752-- | Build a stream from its church encoding. The function passed maps
753-- directly to the underlying representation of the stream type. The second
753-- directly to the underlying representation of the stream type. The second