| Safe Haskell | None |
|---|
Data.Conduit.Extra.Resumable
- data ResumableConduit i m o = ResumableConduit (Conduit i m o) (m ())
- 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 Source
A generalization of ResumableSource. Allows to resume an arbitrary
conduit, keeping its state and using it later (or finalizing it).
Constructors
| ResumableConduit (Conduit i m o) (m ()) |
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)Source
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.
(=$$++) :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m (ResumableConduit i m o, r)Source
Continue processing after usage of =$$+. An alias for connectResume.
(=$$+-) :: Monad m => ResumableConduit i m o -> Sink o m r -> Sink i m rSource
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
=$$++.