Safe Haskell | Safe |
---|---|

Language | Haskell2010 |

- effect :: Monad m => (a -> m b) -> Conduit a m a
- effect' :: Monad m => m b -> Conduit a m a
- inJust :: Monad m => Conduit a m c -> Conduit (Maybe a) m (Maybe c)
- mvarSink :: MonadIO m => MVar a -> Sink a m ()
- tapWith :: Monad m => Conduit a m b -> Sink b m () -> Conduit a m a
- tap :: Monad m => Sink a m () -> Conduit a m a
- tapPred :: Monad m => (a -> Bool) -> Sink a m () -> Sink a m () -> Conduit a m a
- sinkWithPred :: Monad m => (a -> Bool) -> Sink a m () -> Sink a m () -> Sink a m ()
- projectNothings :: Monad m => Conduit (Maybe a) m ()
- tapNothing :: Monad m => Sink () m () -> Conduit (Maybe a) m (Maybe a)
- divertNothing :: Monad m => Sink () m () -> Conduit (Maybe a) m a
- projectLefts :: Monad m => Conduit (Either l r) m l
- projectRights :: Monad m => Conduit (Either l r) m r
- tapLeft :: Monad m => Sink l m () -> Conduit (Either l r) m (Either l r)
- divertLeft :: Monad m => Sink l m () -> Conduit (Either l r) m r
- tapRight :: Monad m => Sink r m () -> Conduit (Either l r) m (Either l r)
- divertRight :: Monad m => Sink r m () -> Conduit (Either l r) m l
- everyN :: Monad m => Int -> Conduit a m a
- everyNSeconds :: MonadIO m => Int -> Conduit a m a

# Documentation

effect :: Monad m => (a -> m b) -> Conduit a m a Source #

Performs the effect but ignores its result. The original value is propagated downstream.

effect' :: Monad m => m b -> Conduit a m a Source #

Performs the effect but ignores its result. The original value is propagated downstream.

tapWith :: Monad m => Conduit a m b -> Sink b m () -> Conduit a m a Source #

Taps the stream by applying a transformation and sending the transformed value into a given sink. The original value is then propagated downstream.

tapWith projectLefts myErrorSink

tap :: Monad m => Sink a m () -> Conduit a m a Source #

Taps into a given sink. The original value is then propagated downstream.

tapPred :: Monad m => (a -> Bool) -> Sink a m () -> Sink a m () -> Conduit a m a Source #

Taps a conduit, and sends the results into two different sinks, switching on a predicate.

sinkWithPred :: Monad m => (a -> Bool) -> Sink a m () -> Sink a m () -> Sink a m () Source #

Creates a unified sink, which is actually two separate sinks with results being sent to one or the other based on a predicate.

projectNothings :: Monad m => Conduit (Maybe a) m () Source #

Projects nothings from the stream. Returns a stream that only contains nothings (represented by unit)

projectLefts :: Monad m => Conduit (Either l r) m l Source #

Projects left side values for each value in a stream. Downstream only receives values that were on the left side, the right side is ignored.

projectRights :: Monad m => Conduit (Either l r) m r Source #

Projects right side values for each value in a stream. Downstream only receives values that were on the right side, the left side is ignored.

divertLeft :: Monad m => Sink l m () -> Conduit (Either l r) m r Source #

Sends every left-side value in a stream into a given `Sink`

.
Downstream receives only right-side values.