Pipes
Use pipes to create elegant streaming programs within Haskell. Build streaming components and connect them them together to process both events and data.
Libraries
Pipes is the official Hackage category for the pipes ecosystem.
pipes
The pipes package is the core library which emphasizes:
- Elegance and Simplicity
- Speed
- Lightweight dependencies
The pipes library offers many unique features not available in other streaming libraries:
- Bidirectional streams
- Extension framework
- Elegant ListT interconversions
- Correctness proofs for the entire library
Read the official pipes tutorial to learn more.
Source code hosted on GitHub
pipes-safe
The pipes-safe package adds resource management and exception safety to the pipes ecosystem. pipes-safe offers many high-level features such as:
- Complete exception safety, including asynchronous exceptions
- Termination safety
- Resources are freed in reverse order of acquisition
Additionally, pipes-safe is the only streaming library that provides truly native exception handling, allowing you to seamlessly handle exceptions and resume uninterrupted streaming.
Read the official pipes-safe tutorial to learn more.
Source code hosted on GitHub
pipes-concurrency
The pipes-concurrency package adds powerful and light-weight concurrency primitives to the pipes ecosystem. Use these primitives to:
- Build reactive event-driven programs
- Merge and split streams
- Communicate between multiple concurrent pipelines
- Manage multiple resources simultaneously
The pipes-concurrency library offers several features unavailable in other streaming libraries such as:
- Deadlock safety
- Cyclic communication graphs
- Dynamically changing graph topologies
Read the official pipes-concurrency tutorial to learn more.
Source code hosted on GitHub
pipes-parse
The pipes-parse package defines the generic machinery necessary for common parsing tasks using pipes:
- Detect and handle end of input
- Save unused input for later steps
- Mix proxies with different leftover buffers using lenses
- Nesting and delimiting parsers to a subset of the input
- Interruptible and resumable parsing
Read the official pipes-parse tutorial to learn more.
Source code hosted on GitHub
Community-contributed libraries
pipes-attoparsec
The pipes-attoparsec library converts attoparsec parsers to pipes for high-performance incremental parsing.
Source code hosted on GitHub
pipes-network
The pipes-network library converts server and client sockets to pipes to seamlessly stream data over any network.
Source code hosted on GitHub
pipes-network-tls
The pipes-network-tls allows streaming through TLS-secured network connections, exposing a similar API to the one exposed by pipes-network.
Source code hosted on GitHub
pipes-zlib
The pipes-zlib enables compression and decompression of strict ByteString streams using the zlib codec.
Source code hosted on GitHub
Community
Besides the usual Haskell community channels such as the official mailing lists or the Haskell subreddit, you can ask for help, suggest improvements, or discuss about the Pipes ecosystem at the “haskell-pipes” mailing list at Google Groups.
Announcements
In chronological order.
- pipes-1.0.0: The original announcement, which first introduced the concept of unifying sources and sinks and transducers into a single Category.
- pipes-2.0.0: The introduction of Frames, later deprecated in favor of pipes-safe.
- pipes-2.1.0: Transition of Frames to indexed monads, later deprecated in favor of pipes-safe.
- pipes-2.3.0: The introduction of bidirectional Proxies, which evolved into modern pipes.
- pipes-2.4.0: The release of the proxy transformer extension system.
- pipes-2.5.0: Major performance improvements.
- pipes-3.0.0: Major API simplification and consolidation.
- pipes-safe-1.0.0: Resource safety and exception management
- pipes-network-0.1.0: Use TCP network sockets as pipes streams.
- pipes-3.2.0: ListT integration, Codensity proxy transformer, and ArrowChoice primitives.
- pipes-concurrency-1.0.0: Concurrency support for pipes
- pipes-zlib-0.2.0.0: Zlib compression/decompression support for pipes
- pipes-network-tls-0.1.0.0: Stream through TLS-secured network connections.
- pipes-parse-1.0.0: Pushback, delimited parsers, resumable parsing, and lenses
- pipes-attoparsec-0.2.0.0: New API, interleaved parsing support, built on top of pipes-parse.
Upcoming libraries
- pipes-bytestring: ByteString support. Source code is hosted at GitHub
- pipes-text: Text support
- pipes-free: Pipe suspension and single-stepping pipes
- pipes-aeson: Encoding and decoding of JSON streams, built using
aeson
andpipes-attoparsec
. Source code is hosted at GitHub
- pipes-binary: Encoding and decoding of Binary streams, built using
binary
andpipes-parse
. Source code is hosted at GitHub