| Safe Haskell | None |
|---|
Data.Conduit.Extra.Resumable
- data ResumableConduit i m o
- connectResume :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m (ResumableConduit i m o, r)
- (=$$+) :: Monad m => Conduit a m b -> Sink b m r -> Sink a m (ResumableConduit a m b, r)
- (=$$++) :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m (ResumableConduit i m o, r)
- (=$$+-) :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m r
Documentation
data ResumableConduit i m o
A generalization of ResumableSource. Allows to resume an arbitrary
conduit, keeping its state and using it later (or finalizing it).
Since 1.0.17
connectResume :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m (ResumableConduit i m o, r)Source
Connect a ResumableConduit to a sink and return the output of the sink
together with a new ResumableConduit.
(=$$+) :: Monad m => Conduit a m b -> Sink b m r -> Sink a m (ResumableConduit a m b, r)
The connect-and-resume operator. This does not close the Conduit, but
instead returns it to be used again. This allows a Conduit to be used
incrementally in a large program, without forcing the entire program to live
in the Sink monad.
Leftover data returned from the Sink will be discarded.
Mnemonic: connect + do more.
Since 1.0.17
(=$$++) :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m (ResumableConduit i m o, r)
Continue processing after usage of =$$+. Connect a ResumableConduit to
a sink and return the output of the sink together with a new
ResumableConduit.
Since 1.0.17
(=$$+-) :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m r
Complete processing of a ResumableConduit. This will run the finalizer
associated with the ResumableConduit. In order to guarantee process
resource finalization, you must use this operator after using =$$+ and
=$$++.
Since 1.0.17