@@ -73,12 +73,10 @@ module Streamly.Internal.Data.Stream.StreamK
7373 , foldr
7474 , foldr1
7575 , foldrM
76− , foldrT
7776
7877 , foldl'
7978 , foldlM'
8079 , foldlS
81− , foldlT
8280 , foldlx'
8381 , foldlMx'
8482 , fold
@@ -178,7 +176,6 @@ where
178176#include "assert.hs"
179177
180178import Control.Monad.Catch (MonadThrow, throwM)
181−import Control.Monad.Trans.Class (MonadTrans(lift))
182179import Control.Monad (void, join)
183180import Streamly.Internal.Data.Fold.Type (Fold(..))
184181import Streamly.Internal.Data.SVar.Type (adaptState, defState)
@@ -274,18 +271,6 @@ fromList = fromFoldable
274271foldr :: Monad m => (a -> b -> b) -> b -> Stream m a -> m b
275272foldr step acc = foldrM (\x xs -> xs >>= \b -> return (step x b)) (return acc)
276273
277−-- | Right associative fold to an arbitrary transformer monad.
278−{-# INLINE foldrT #-}
279−foldrT :: (Monad m, Monad (s m), MonadTrans s)
280− => (a -> s m b -> s m b) -> s m b -> Stream m a -> s m b
281−foldrT step final = go
282− where
283− go m1 = do
284− res <- lift $ uncons m1
285− case res of
286− Just (h, t) -> step h (go t)
287− Nothing -> final
288−
289274{-# INLINE foldr1 #-}
290275foldr1 :: Monad m => (a -> a -> a) -> Stream m a -> m (Maybe a)
291276foldr1 step m = do
@@ -379,18 +364,6 @@ foldBreak fld strm = do
379364foldlM' :: Monad m => (b -> a -> m b) -> m b -> Stream m a -> m b
380365foldlM' step begin = foldlMx' step begin return
381366
382−-- | Lazy left fold to an arbitrary transformer monad.
383−{-# INLINE foldlT #-}
384−foldlT :: (Monad m, Monad (s m), MonadTrans s)
385− => (s m b -> a -> s m b) -> s m b -> Stream m a -> s m b
386−foldlT step = go
387− where
388− go acc m1 = do
389− res <- lift $ uncons m1
390− case res of
391− Just (h, t) -> go (step acc h) t
392− Nothing -> acc
393−
394367------------------------------------------------------------------------------
395368-- Specialized folds
396369------------------------------------------------------------------------------