Safe Haskell | None |
---|---|
Language | Haskell2010 |
- newtype BatchSize :: * = BatchSize {
- unBatchSize :: Int
- batchByOrFlush :: Monad m => BatchSize -> Conduit (Maybe a) m [a]
- batchByOrFlushEither :: Monad m => BatchSize -> Conduit (Either e a) m [a]
- foldYield :: Monad m => (i -> s -> (s, [o])) -> (s -> [o]) -> s -> Conduit i m o
- throwLeft :: (MonadThrow m, Exception e) => Conduit (Either e i) m i
- throwLeftSatisfy :: (MonadThrow m, Exception e) => (e -> Bool) -> Conduit (Either e i) m (Either e i)
Documentation
foldYield :: Monad m => (i -> s -> (s, [o])) -> (s -> [o]) -> s -> Conduit i m o Source #
Create a conduit that folds with the function f over its input i with its internal state s and emits outputs [o], then finally emits outputs [o] from the function g applied to the final state s.
throwLeft :: (MonadThrow m, Exception e) => Conduit (Either e i) m i Source #
Throws the left part of a value in a MonadThrow
context
throwLeftSatisfy :: (MonadThrow m, Exception e) => (e -> Bool) -> Conduit (Either e i) m (Either e i) Source #
Throws the left part of a value in a MonadThrow
context if the value
satisfies the predicate