| CARVIEW |
streamly: Streaming data pipelines with declarative concurrency
For upgrading to streamly-0.9.0+ please read the Streamly-0.9.0 upgrade guide.
Streamly is a high-performance, beginner-friendly standard library for Haskell. It unifies streaming with list transformers and logic programming; unifies streaming with concurrency and reactive programming; unifies arrays with ring arrays, text, bytestring and vector use cases; unifies arrays with builders and binary serialization; generalizes parsers to any input type and unifies attoparsec, parsec use cases with better performance; provides streaming fileIO — all with a clean, consistent, well-integrated and streaming enabled API.
Streams are designed to have a list like interface — no steep learning curve, no complex types. Streamly is designed to build general purpose applications in a truly functional manner, from simple hello-world to advanced high-performance systems. The design emphasizes simplicity, modularity, and code reuse with minimal building blocks. Performance is on par with C, tuning is easy, and it’s hard to get it wrong.
Streamly is serial by default, with seamless declarative concurrency that scales automatically when needed. It provides prompt and safe resource management, works well with other streaming libraries as well as core libraries like bytestring and text, and is backed by solid documentation.
The streamly package is built on top of the streamly-core package
and offers high-level capabilities such as concurrency, reactive
programming, time-related combinators, lifted exceptions, and
networking. It provides streaming with concurrency, and is a more
powerful, higher-level and more expressive alternative to the async
package.
Performant. Unified. Modular. Powerful. Simple.
Learn more at the streamly website.
[Skip to Readme]
Modules
[Index] [Quick Jump]
- Streamly
- Data
- Internal
- Control
- Data
- Streamly.Internal.Data.Atomics
- Streamly.Internal.Data.Channel
- Streamly.Internal.Data.Cont
- Fold
- IOFinalizer
- IsMap
- Streamly.Internal.Data.SVar
- Scanl
- Streamly.Internal.Data.SmallArray
- Stream
- Streamly.Internal.Data.Stream.Ahead
- Streamly.Internal.Data.Stream.Async
- Streamly.Internal.Data.Stream.IsStream
- Streamly.Internal.Data.Stream.MkType
- Streamly.Internal.Data.Stream.Parallel
- Streamly.Internal.Data.Stream.Prelude
- Streamly.Internal.Data.Stream.SVar
- Streamly.Internal.Data.Stream.Serial
- Streamly.Internal.Data.Stream.Zip
- Streamly.Internal.Data.Stream.ZipAsync
- Unfold
- FileSystem
- Streamly.Internal.FileSystem.Event
- Streamly.Internal.FileSystem.Event.Darwin
- Streamly.Internal.FileSystem.Event.Linux
- Streamly.Internal.FileSystem.Event.Windows
- Streamly.Internal.FileSystem.Event
- Network
- Unicode
- Network
- Streamly.Prelude
Flags
Manual Flags
| Name | Description | Default |
|---|---|---|
| fusion-plugin | Use fusion plugin for benchmarks and executables | Disabled |
| inspection | Enable inspection testing | Disabled |
| debug | Debug build with asserts enabled | Disabled |
| internal-dev | DO NOT USE, ONLY FOR INTERNAL USE. | Disabled |
| has-llvm | Use llvm backend for code generation | Disabled |
| opt | off=GHC default, on=-O2 | Enabled |
| limit-build-mem | Limits memory when building | Disabled |
| internal-use-unliftio | DO NOT USE, ONLY FOR INTERNAL USE. | Disabled |
Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info
Downloads
- streamly-0.11.0.tar.gz [browse] (Cabal source package)
- Package description (revised from the package)
Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
| Versions [RSS] | 0.1.0, 0.1.1, 0.1.2, 0.2.0, 0.2.1, 0.3.0, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.2, 0.6.0, 0.6.1, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.7.3.1, 0.7.3.2, 0.8.0, 0.8.1, 0.8.1.1, 0.8.2, 0.8.3, 0.9.0, 0.10.0, 0.10.1, 0.11.0 |
|---|---|
| Change log | CHANGELOG.md |
| Dependencies | atomic-primops (>=0.8 && <0.9), base (>=4.12 && <4.22), containers (>=0.6.0 && <0.8), deepseq (>=1.4.4 && <1.6), directory (>=1.2.2 && <1.4), exceptions (>=0.8.0 && <0.11), fusion-plugin-types (>=0.1 && <0.2), hashable (>=1.3 && <1.6), heaps (>=0.3 && <0.5), lockfree-queue (>=0.2.4 && <0.3), monad-control (>=1.0 && <1.1), mtl (>=2.2.2 && <2.4), network (>=2.6 && <3.3), streamly-core (==0.3.0), template-haskell (>=2.14 && <2.24), transformers (>=0.5.5 && <0.7), transformers-base (>=0.4 && <0.5), unicode-data (>=0.1 && <0.9), unordered-containers (>=0.2 && <0.3), Win32 (>=2.6 && <2.14) [details] |
| Tested with | ghc ==8.6.5, ghc ==8.8.4, ghc ==8.10.7, ghc ==9.0.2, ghc ==9.2.8, ghc ==9.4.7, ghc ==9.6.3, ghc ==9.8.1, ghc ==9.10.1, ghc ==9.12.1 |
| License | BSD-3-Clause |
| Copyright | 2017 Composewell Technologies |
| Author | Composewell Technologies |
| Maintainer | streamly@composewell.com |
| Uploaded | by adithyaov at 2025-09-03T13:33:40Z |
| Revised | Revision 1 made by adithyaov at 2025-10-20T13:29:04Z |
| Category | Streamly, Concurrency, Streaming, Dataflow, Pipes, Reactivity, List, Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem, Network |
| Home page | https://streamly.composewell.com |
| Bug tracker | https://github.com/composewell/streamly/issues |
| Source repo | head: git clone https://github.com/composewell/streamly |
| Distributions | LTSHaskell:0.10.1, NixOS:0.10.1, Stackage:0.11.0 |
| Reverse Dependencies | 35 direct, 4 indirect [details] |
| Downloads | 19938 total (95 in the last 30 days) |
| Rating | 2.5 (votes: 6) [estimated by Bayesian average] |
| Your Rating |
|
| Status | Docs available [build log] Last success reported on 2025-09-03 [all 1 reports] |
Readme for streamly-0.11.0
[back to package description]Streamly: Idiomatic Haskell with C-Like Performance
Upgrading to 0.9.0+
Please read the Streamly 0.9.0 Upgrade Guide.
Overview
Streamly is a powerful Haskell library that provides developers with the essential building blocks to create safe, scalable, modular, and high-performance software. With Streamly, developers can enjoy the benefits of Haskell's type safety while leveraging C-like program performance. Streamly offers a comprehensive range of features, comprising:
- Haskell's strong type safety.
- C-program-like performance capabilities.
- Flexible, modular building blocks.
- Idiomatic functional programming.
- Fearless, declarative concurrency for seamless parallel execution.
- A collection of ecosystem libraries for fast and efficient development.
Check out the Learn By Examples page for an introduction to the library. For more detailed documentation, visit the Haskell Streamly website.
Blazing Fast
Streamly delivers C-like speed in Haskell by fusing stream pipelines using the stream-fusion technique, resulting in compiled code that is equivalent to handwritten C code, eliminating intermediate allocations and function calls.
For a comprehensive comparison of Streamly to other Haskell streaming libraries, check out our streaming benchmarks page. In fact, Streamly's fused loops can be up to 100 times faster than those of libraries without stream fusion.
Declarative Concurrency
Streamly introduces declarative concurrency to standard functional streaming abstractions. Declarative concurrency abstracts away the low-level details of concurrency management, such as locks and threads, and allows for easier and safer parallelization of code. For example, with Streamly you can do things like repeat actions concurrently to generate a stream of results, map functions concurrently on a stream, and combine multiple streams concurrently to create a single output stream.
Unified API
Streamly provides a comprehensive and unified API for basic programming needs, covering a wide range of areas including streaming, concurrency, logic programming, reactive programming, pinned and unpinned arrays, serialization, builders, parsers, unicode processing, file-io, file system events, and network-io. By unifying functionality from disparate Haskell libraries, Streamly simplifies development while delivering equivalent or improved performance. Additionally, the complexity of handling combinations of lazy, strict, bytestring, and text is eliminated by using streams for lazy evaluation, and by generalizing bytestring and text to arrays.
Check out Streamly's documentation for more information about Streamly's features.
Batteries Included
In addition to the fundamental programming constructs, Streamly also provides higher-level functionality through supporting packages such as streamly-process, streamly-shell, and streamly-coreutils that are essential for general programming tasks. Check out the streamly-examples repository for some program snippets.
Highly Modular
Traditionally, you must choose between modularity and performance when
writing code. However, with Haskell Streamly, you can have
the best of both worlds. By taking advantage of GHC's stream fusion
optimizations (such as case-of-case and spec-constr), Streamly achieves
performance comparable to an equivalent C program while still allowing
for highly modular code.
Credits
The following authors/libraries have influenced or inspired this library in a significant way:
Please see the credits directory for a full
list of contributors, credits and licenses.
Licensing
Streamly is an open source project available under a liberal BSD-3-Clause license
Contributing to Streamly
As an open project we welcome contributions:
Getting Support
Professional support is available for Streamly: please contact support@composewell.com.
You can also join our community chat channel on Gitter.