Data.Conduit.Combinators.Stream

conduit-combinators-1.0.5: Commonly used conduit functions, for both chunked and unchunked data

Safe Haskell | None
Language | Haskell98

Data.Conduit.Combinators.Stream

Description

These are stream fusion versions of some of the functions in Data.Conduit.Combinators. Many functions don't have stream versions here because instead they have `RULES` which inline a definition that fuses.

Synopsis

- yieldManyS :: (Monad m, MonoFoldable mono) => mono -> StreamProducer m (Element mono)
- repeatMS :: Monad m => m a -> StreamProducer m a
- repeatWhileMS :: Monad m => m a -> (a -> Bool) -> StreamProducer m a
- sourceHandleS :: (MonadIO m, MonoFoldable a, IOData a) => Handle -> StreamProducer m a
- foldl1S :: Monad m => (a -> a -> a) -> StreamConsumer a m (Maybe a)
- allS :: Monad m => (a -> Bool) -> StreamConsumer a m Bool
- anyS :: Monad m => (a -> Bool) -> StreamConsumer a m Bool
- sinkLazyS :: (Monad m, LazySequence lazy strict) => StreamConsumer strict m lazy
- sinkVectorS :: (MonadBase base m, Vector v a, PrimMonad base) => StreamConsumer a m (v a)
- sinkVectorNS :: (MonadBase base m, Vector v a, PrimMonad base) => Int -> StreamConsumer a m (v a)
- sinkLazyBuilderS :: (Monad m, Monoid builder, ToBuilder a builder, Builder builder lazy) => StreamConsumer a m lazy
- lastS :: Monad m => StreamConsumer a m (Maybe a)
- lastES :: (Monad m, IsSequence seq) => StreamConsumer seq m (Maybe (Element seq))
- findS :: Monad m => (a -> Bool) -> StreamConsumer a m (Maybe a)
- concatMapS :: (Monad m, MonoFoldable mono) => (a -> mono) -> StreamConduit a m (Element mono)
- concatMapMS :: (Monad m, MonoFoldable mono) => (a -> m mono) -> StreamConduit a m (Element mono)
- concatS :: (Monad m, MonoFoldable mono) => StreamConduit mono m (Element mono)
- scanlS :: Monad m => (a -> b -> a) -> a -> StreamConduit b m a
- scanlMS :: Monad m => (a -> b -> m a) -> a -> StreamConduit b m a
- mapAccumWhileS :: Monad m => (a -> s -> Either s (s, b)) -> s -> StreamConduitM a b m s
- mapAccumWhileMS :: Monad m => (a -> s -> m (Either s (s, b))) -> s -> StreamConduitM a b m s
- intersperseS :: Monad m => a -> StreamConduit a m a
- slidingWindowS :: (Monad m, IsSequence seq, Element seq ~ a) => Int -> StreamConduit a m seq
- filterMS :: Monad m => (a -> m Bool) -> StreamConduit a m a
- splitOnUnboundedES :: (Monad m, IsSequence seq) => (Element seq -> Bool) -> StreamConduit seq m seq
- initReplicateS :: Monad m => m seed -> (seed -> m a) -> Int -> StreamProducer m a
- initRepeatS :: Monad m => m seed -> (seed -> m a) -> StreamProducer m a

# Documentation

yieldManyS :: (Monad m, MonoFoldable mono) => mono -> StreamProducer m (Element mono) #

repeatMS :: Monad m => m a -> StreamProducer m a #

repeatWhileMS :: Monad m => m a -> (a -> Bool) -> StreamProducer m a #

sourceHandleS :: (MonadIO m, MonoFoldable a, IOData a) => Handle -> StreamProducer m a #

foldl1S :: Monad m => (a -> a -> a) -> StreamConsumer a m (Maybe a) #

allS :: Monad m => (a -> Bool) -> StreamConsumer a m Bool #

anyS :: Monad m => (a -> Bool) -> StreamConsumer a m Bool #

sinkLazyS :: (Monad m, LazySequence lazy strict) => StreamConsumer strict m lazy #

sinkVectorS :: (MonadBase base m, Vector v a, PrimMonad base) => StreamConsumer a m (v a) #

sinkVectorNS #

Arguments

:: (MonadBase base m, Vector v a, PrimMonad base) |
=> Int | maximum allowed size
-> StreamConsumer a m (v a) |

sinkLazyBuilderS :: (Monad m, Monoid builder, ToBuilder a builder, Builder builder lazy) => StreamConsumer a m lazy #

lastS :: Monad m => StreamConsumer a m (Maybe a) #

lastES :: (Monad m, IsSequence seq) => StreamConsumer seq m (Maybe (Element seq)) #

findS :: Monad m => (a -> Bool) -> StreamConsumer a m (Maybe a) #

concatMapS :: (Monad m, MonoFoldable mono) => (a -> mono) -> StreamConduit a m (Element mono) #

concatMapMS :: (Monad m, MonoFoldable mono) => (a -> m mono) -> StreamConduit a m (Element mono) #

concatS :: (Monad m, MonoFoldable mono) => StreamConduit mono m (Element mono) #

scanlS :: Monad m => (a -> b -> a) -> a -> StreamConduit b m a #

scanlMS :: Monad m => (a -> b -> m a) -> a -> StreamConduit b m a #

mapAccumWhileS :: Monad m => (a -> s -> Either s (s, b)) -> s -> StreamConduitM a b m s #

mapAccumWhileMS :: Monad m => (a -> s -> m (Either s (s, b))) -> s -> StreamConduitM a b m s #

intersperseS :: Monad m => a -> StreamConduit a m a #

slidingWindowS :: (Monad m, IsSequence seq, Element seq ~ a) => Int -> StreamConduit a m seq #

filterMS :: Monad m => (a -> m Bool) -> StreamConduit a m a #

splitOnUnboundedES :: (Monad m, IsSequence seq) => (Element seq -> Bool) -> StreamConduit seq m seq #

initReplicateS :: Monad m => m seed -> (seed -> m a) -> Int -> StreamProducer m a #

Streaming versions of `Data.Conduit.Combinators.Internal.initReplicate`

initRepeatS :: Monad m => m seed -> (seed -> m a) -> StreamProducer m a #

Streaming versions of `Data.Conduit.Combinators.Internal.initRepeat`