Hoogle Search
Within LTS Haskell 24.28 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
fromList :: forall (m :: Type -> Type) t a . (Monad m, IsStream t) => [a] -> t m astreamly Streamly.Internal.Data.Stream.IsStream fromList = foldr cons nil
Construct a stream from a list of pure values. This is more efficient than fromFoldable for serial streams.fromListM :: (MonadAsync m, IsStream t) => [m a] -> t m astreamly Streamly.Internal.Data.Stream.IsStream >>> fromListM = Stream.fromFoldableM >>> fromListM = Stream.sequence . Stream.fromList >>> fromListM = Stream.mapM id . Stream.fromList >>> fromListM = Prelude.foldr Stream.consM Stream.nil
Construct a stream from a list of monadic actions. This is more efficient than fromFoldableM for serial streams.toList :: Monad m => SerialT m a -> m [a]streamly Streamly.Internal.Data.Stream.IsStream toList = Stream.foldr (:) []
Convert a stream into a list in the underlying monad. The list can be consumed lazily in a lazy monad (e.g. Identity). In a strict monad (e.g. IO) the whole list is generated and buffered before it can be consumed. Warning! working on large lists accumulated as buffers in memory could be very inefficient, consider using Streamly.Array instead.toListRev :: Monad m => SerialT m a -> m [a]streamly Streamly.Internal.Data.Stream.IsStream toListRev = Stream.foldl' (flip (:)) []
Convert a stream into a list in reverse order in the underlying monad. Warning! working on large lists accumulated as buffers in memory could be very inefficient, consider using Streamly.Array instead. Pre-release-
streamly Streamly.Internal.Data.Stream.Prelude Like parConcat but works on a list of streams.
>>> parList modifier = Stream.parConcat modifier . Stream.fromList
parListEager :: forall (m :: Type -> Type) a . MonadAsync m => [Stream m a] -> Stream m astreamly Streamly.Internal.Data.Stream.Prelude Like parListLazy but with eager on.
>>> parListEager = Stream.parList (Stream.eager True)
parListEagerFst :: forall (m :: Type -> Type) a . MonadAsync m => [Stream m a] -> Stream m astreamly Streamly.Internal.Data.Stream.Prelude Like parListEager but stops the output as soon as the first stream stops.
>>> parListEagerFst = Stream.parList (Stream.eager True . Stream.stopWhen Stream.FirstStops)
parListEagerMin :: forall (m :: Type -> Type) a . MonadAsync m => [Stream m a] -> Stream m astreamly Streamly.Internal.Data.Stream.Prelude Like parListEager but stops the output as soon as any of the two streams stops. Definition:
>>> parListEagerMin = Stream.parList (Stream.eager True . Stream.stopWhen Stream.AnyStops)
parListInterleaved :: forall (m :: Type -> Type) a . MonadAsync m => [Stream m a] -> Stream m astreamly Streamly.Internal.Data.Stream.Prelude Like parListLazy but interleaves the streams fairly instead of prioritizing the left stream. This schedules all streams in a round robin fashion over limited number of threads.
>>> parListInterleaved = Stream.parList (Stream.interleaved True)
parListLazy :: forall (m :: Type -> Type) a . MonadAsync m => [Stream m a] -> Stream m astreamly Streamly.Internal.Data.Stream.Prelude Like concat but works on a list of streams.
>>> parListLazy = Stream.parList id