conduit -is:module
Streaming data processing library.
conduit is a solution to the streaming data problem, allowing
for production, transformation, and consumption of streams of data in
constant memory. It is an alternative to lazy I/O which guarantees
deterministic resource handling.
For more information about conduit in general, and how this package in
particular fits into the ecosystem, see
the conduit homepage.
Hackage documentation generation is not reliable. For up to date
documentation, please see:
http://www.stackage.org/package/conduit.
Lift a conduit into a segment.
Deprecated: Use ConduitT directly
A component of a conduit pipeline, which takes a stream of
input, produces a stream of output, performs actions
in the underlying monad, and produces a value of
result when no more output data is available.
Consumes a stream of input values and produces a stream of output
values, without producing a final result.
Since 0.5.0
Break up a stream of values into vectors of size n. The final vector
may be smaller than n if the total number of values is not a strict
multiple of n. No empty vectors will be yielded.
Batteries included conduit: adapters for common libraries.
The conduit package itself maintains relative small dependencies. The
purpose of this package is to collect commonly used utility functions
wrapping other library dependencies, without depending on
heavier-weight dependencies. The basic idea is that this package
should only depend on haskell-platform packages and conduit.
Consume a stream of parsed tokens, returning both the token and the
position it appears at. This function will raise a
ParseError
on bad input.
Since 0.5.0
Stream the contents of the input to a file, and also send it along the
pipeline. Similar in concept to the Unix command tee.
Since 0.3.0
Stream the contents of the input to a Handle, and also send
it along the pipeline. Similar in concept to the Unix command
tee. Like sourceHandle, does not close the handle on
completion. Related to: conduitFile.
Since 1.0.9
Runs default
Decoder repeatedly on a input stream.
Runs default encoder on a input stream.
This function produces a stream of bytes where for each input value
you will have a number of
ByteStrings, and no boundary between
different values.
Runs getter repeatedly on a input stream.
Runs default encoder on input stream.
This function produces a ByteString per each incomming packet, it may
be useful in datagram based protocols. Function maintains following
property
'conduitMsgEncode' xs == 'CL.map' 'Data.ByteString.encode' =$= 'CL.map' 'LBS.toStrict'
This invariant is maintaind by the cost of additional data copy, so if
you packets can be serialized to the large data chunks or you
interested in iterative packet serialization concider using
conduitPutList or
conduitPutMany
Runs putter repeatedly on a input stream, returns an output stream.
Runs putter repeatedly on a input stream. Returns a lazy butestring so
it's possible to use vectorized IO on the result either by calling'
LBS.toChunks' or by calling
send.
Vectorized variant of
conduitPut returning list contains all
chunks from one element representation