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

Language | Haskell2010 |

- maybeC :: Monad m => Conduit () m () -> Conduit a m c -> Conduit (Maybe a) m (Maybe c)
- justC :: Monad m => Conduit a m c -> Conduit (Maybe a) m (Maybe c)
- nothingC :: Monad m => Conduit () m () -> Conduit (Maybe a) m (Maybe a)
- eitherC :: Monad m => Conduit l m a -> Conduit r m a -> Conduit (Either l r) m a
- rightC :: Monad m => Conduit r m a -> Conduit (Either l r) m (Either l a)
- leftC :: Monad m => Conduit l m a -> Conduit (Either l r) m (Either a r)
- effectC :: Monad m => (a -> m b) -> Conduit a m a
- effectC' :: Monad m => m b -> 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 ()
- projectLefts :: Monad m => Conduit (Either l r) m l
- projectRights :: Monad m => Conduit (Either l r) m r
- everyN :: Monad m => Int -> Conduit a m a
- everyNSeconds :: MonadIO m => Int -> Conduit a m a
- 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
- tapNothing :: Monad m => Sink () m () -> Conduit (Maybe a) m (Maybe a)
- divertNothing :: Monad m => Sink () m () -> Conduit (Maybe a) m a
- 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

# Documentation

maybeC :: Monad m => Conduit () m () -> Conduit a m c -> Conduit (Maybe a) m (Maybe c) Source #

Run the provided conduit in the Just case

justC :: Monad m => Conduit a m c -> Conduit (Maybe a) m (Maybe c) Source #

Run the provided conduit in the Just case

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

Run the provided conduit in the Just case

eitherC :: Monad m => Conduit l m a -> Conduit r m a -> Conduit (Either l r) m a Source #

Run the provided conduits on the left and right side of the either respectively

rightC :: Monad m => Conduit r m a -> Conduit (Either l r) m (Either l a) Source #

Run the conduit on the right side of the either

leftC :: Monad m => Conduit l m a -> Conduit (Either l r) m (Either a r) Source #

Run the conduit on the left side of the either

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

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

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

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

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.

everyNSeconds :: MonadIO m => Int -> Conduit a m a Source #

Propagate a message every N seconds and drop all others.

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

Deprecated: Use effectC instead

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.

inJust :: Monad m => Conduit a m c -> Conduit (Maybe a) m (Maybe c) Source #

Deprecated: Use justC instead

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

Deprecated: Unsafe. Do not use

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 #

Deprecated: Unsafe. Do not use

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 #

Deprecated: Unsafe. Do not use

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

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

Deprecated: Unsafe. Do not use

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

.
Downstream receives only right-side values.