3synopsis: Beautiful Streaming, Concurrent and Reactive Composition
5 Streamly, short for streaming concurrently, provides monadic streams, with a
6 simple API, almost identical to standard lists, and an in-built support for
7 concurrency. By using stream-style combinators on stream composition,
8 streams can be generated, merged, chained, mapped, zipped, and consumed
9 concurrently – providing a generalized high level programming framework
10 unifying streaming and concurrency. Controlled concurrency allows even
11 infinite streams to be evaluated concurrently. Concurrency is auto scaled
12 based on feedback from the stream consumer. The programmer does not have to
13 be aware of threads, locking or synchronization to write scalable concurrent
16 The basic streaming functionality of streamly is equivalent to that provided by
17 streaming libraries like
18 <https://hackage.haskell.org/package/vector vector>,
19 <https://hackage.haskell.org/package/streaming streaming>,
20 <https://hackage.haskell.org/package/pipes pipes>, and
21 <https://hackage.haskell.org/package/conduit conduit>.
22 In addition to providing streaming functionality, streamly subsumes the
23 functionality of list transformer libraries like @pipes@ or
24 <https://hackage.haskell.org/package/list-t list-t> and also the logic
25 programming library <https://hackage.haskell.org/package/logict logict>. On
26 the concurrency side, it subsumes the functionality of the
27 <https://hackage.haskell.org/package/async async> package. Because it
28 supports streaming with concurrency we can write FRP applications similar in
29 concept to <https://hackage.haskell.org/package/Yampa Yampa> or
30 <https://hackage.haskell.org/package/reflex reflex>.
32 For file IO, currently the library provides only one API to stream the lines
33 in the file as Strings. Future versions will provide better streaming file
34 IO options. Streamly interoperates with the popular streaming libraries, see
35 the interoperation section in "Streamly.Tutorial".
39 * /Simplicity/: Simple list like streaming API, if you know how to use lists
40 then you know how to use streamly. This library is built with simplicity
41 and ease of use as a primary design goal.
42 * /Concurrency/: Simple, powerful, and scalable concurrency. Concurrency is
43 built-in, and not intrusive, concurrent programs are written exactly the
44 same way as non-concurrent ones.
45 * /Generality/: Unifies functionality provided by several disparate packages
46 (streaming, concurrency, list transformer, logic programming, reactive
47 programming) in a concise API.
48 * /Performance/: Streamly is designed for high performance.
49 It employs stream fusion optimizations for best possible performance.
50 Serial peformance is equivalent to the venerable `vector` library in most
51 cases and even better in some cases. Concurrent performance is unbeatable.
53 <https://github.com/composewell/streaming-benchmarks streaming-benchmarks>
54 for a comparison of popular streaming libraries on micro-benchmarks.
56 Where to find more information:
58 * /Quick Overview/: <src/README.md README file> in the package
59 * /Detailed Tutorial/: "Streamly.Tutorial" module in the haddock documentation
60 * /Reference Documentation/: Haddock documentation for the respective modules
61 * /Examples/: <src/examples examples directory> in the package
62 * /Guides/: <src/docs docs directory> in the package, for documentation on
63 advanced topics, limitations, semantics of the library or on specific use
65 * <https://github.com/composewell/streaming-benchmarks Streaming Benchmarks>
66 * <https://github.com/composewell/concurrency-benchmarks Concurrency Benchmarks>
68homepage: https://github.com/composewell/streamly
69bug-reports: https://github.com/composewell/streamly/issues
72tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
74maintainer: harendra.kumar@gmail.com
75copyright: 2017 Harendra Kumar
76category: Control, Concurrency, Streaming, Reactivity
77stability: Experimental
84 docs/streamly-vs-async.md
90 src/Streamly/Streams/Instances.hs
91 src/Streamly/Streams/inline.hs
95 location: https://github.com/composewell/streamly
98 description: Development build
103 description: Disable rewrite rules
108 description: Use CPS style streams when possible
113 description: Build including examples
118 description: Build including SDL examples
122-------------------------------------------------------------------------------
124-------------------------------------------------------------------------------
128 other-modules: Streamly.SVar
131 , Streamly.Streams.StreamK.Type
132 , Streamly.Streams.StreamK
133 , Streamly.Streams.StreamD.Type
134 , Streamly.Streams.StreamD
135 , Streamly.Streams.Prelude
137 -- Higher level streams
138 , Streamly.Streams.SVar
139 , Streamly.Streams.Serial
140 , Streamly.Streams.Async
141 , Streamly.Streams.Parallel
142 , Streamly.Streams.Ahead
143 , Streamly.Streams.Zip
144 , Streamly.Streams.Combinators
146 exposed-modules: Streamly.Prelude
154 default-language: Haskell2010
155 ghc-options: -Wall -fspec-constr-recursive=10
158 cpp-options: -DUSE_STREAMK_ONLY
161 cpp-options: -DDISABLE_FUSION
164 ghc-options: -Wmissed-specialisations
165 -Wall-missed-specialisations
168 ghc-options: -Wcompat
169 -Wunrecognised-warning-flags
171 -Wincomplete-record-updates
172 -Wincomplete-uni-patterns
173 -Wredundant-constraints
174 -Wnoncanonical-monad-instances
175 -Wnoncanonical-monadfail-instances
177 build-depends: base >= 4.8 && < 5
178 , ghc-prim >= 0.2 && < 0.6
179 , deepseq >= 1.4.3 && < 1.5
180 , containers >= 0.5 && < 0.7
181 , heaps >= 0.3 && < 0.4
184 , atomic-primops >= 0.8 && < 0.9
185 , lockfree-queue >= 0.2.3 && < 0.3
186 , clock >= 0.7.1 && < 0.8
189 , exceptions >= 0.8 && < 0.11
190 , monad-control >= 1.0 && < 2
192 , transformers >= 0.4 && < 0.6
193 , transformers-base >= 0.4 && < 0.5
197 semigroups >= 0.18 && < 0.19
199-------------------------------------------------------------------------------
201-------------------------------------------------------------------------------
203-- Compilation for coverage builds on CI machines takes too long without -O0
206 type: exitcode-stdio-1.0
209 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
211 cpp-options: -DDEVBUILD
212 ghc-options: -Wmissed-specialisations
213 -Wall-missed-specialisations
215 ghc-options: -Wcompat
216 -Wunrecognised-warning-flags
218 -Wincomplete-record-updates
219 -Wincomplete-uni-patterns
220 -Wredundant-constraints
221 -Wnoncanonical-monad-instances
222 -Wnoncanonical-monadfail-instances
226 , hspec >= 2.0 && < 3
227 , containers >= 0.5 && < 0.7
228 , transformers >= 0.4 && < 0.6
230 , exceptions >= 0.8 && < 0.11
231 default-language: Haskell2010
233test-suite pure-streams-base
234 type: exitcode-stdio-1.0
235 main-is: PureStreams.hs
237 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
239 cpp-options: -DDEVBUILD
240 ghc-options: -Wmissed-specialisations
241 -Wall-missed-specialisations
243 ghc-options: -Wcompat
244 -Wunrecognised-warning-flags
246 -Wincomplete-record-updates
247 -Wincomplete-uni-patterns
248 -Wredundant-constraints
249 -Wnoncanonical-monad-instances
250 -Wnoncanonical-monadfail-instances
254 , hspec >= 2.0 && < 3
255 default-language: Haskell2010
257test-suite pure-streams-streamly
258 type: exitcode-stdio-1.0
259 main-is: PureStreams.hs
261 cpp-options: -DUSE_STREAMLY_LIST
262 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
264 cpp-options: -DDEVBUILD
265 ghc-options: -Wmissed-specialisations
266 -Wall-missed-specialisations
268 ghc-options: -Wcompat
269 -Wunrecognised-warning-flags
271 -Wincomplete-record-updates
272 -Wincomplete-uni-patterns
273 -Wredundant-constraints
274 -Wnoncanonical-monad-instances
275 -Wnoncanonical-monadfail-instances
279 , hspec >= 2.0 && < 3
280 default-language: Haskell2010
283 type: exitcode-stdio-1.0
286 ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
288 cpp-options: -DDEVBUILD
289 ghc-options: -Wmissed-specialisations
290 -Wall-missed-specialisations
292 ghc-options: -Wcompat
293 -Wunrecognised-warning-flags
295 -Wincomplete-record-updates
296 -Wincomplete-uni-patterns
297 -Wredundant-constraints
298 -Wnoncanonical-monad-instances
299 -Wnoncanonical-monadfail-instances
303 , QuickCheck >= 2.10 && < 2.13
304 , hspec >= 2.0 && < 3
307 transformers >= 0.4 && < 0.6
308 default-language: Haskell2010
311 type: exitcode-stdio-1.0
312 default-language: Haskell2010
315 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
321 , clock >= 0.7.1 && < 0.8
322 , hspec >= 2.0 && < 3
323 , random >= 1.0.0 && < 2
328 type: exitcode-stdio-1.0
329 default-language: Haskell2010
332 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
337test-suite nested-loops
338 type: exitcode-stdio-1.0
339 default-language: Haskell2010
340 main-is: nested-loops.hs
342 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
346 , random >= 1.0.0 && < 2
348test-suite parallel-loops
349 type: exitcode-stdio-1.0
350 default-language: Haskell2010
351 main-is: parallel-loops.hs
353 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
357 , random >= 1.0.0 && < 2
359-------------------------------------------------------------------------------
361-------------------------------------------------------------------------------
364 type: exitcode-stdio-1.0
365 hs-source-dirs: benchmark
367 other-modules: LinearOps
368 default-language: Haskell2010
369 ghc-options: -O2 -Wall -fspec-constr-recursive=10
371 ghc-options: -Wmissed-specialisations
372 -Wall-missed-specialisations
375 ghc-options: -Wcompat
376 -Wunrecognised-warning-flags
378 -Wincomplete-record-updates
379 -Wincomplete-uni-patterns
380 -Wredundant-constraints
381 -Wnoncanonical-monad-instances
382 -Wnoncanonical-monadfail-instances
386 , deepseq >= 1.4.3 && < 1.5
387 , random >= 1.0 && < 2.0
388 , gauge >= 0.2.4 && < 0.3
390benchmark linear-async
391 type: exitcode-stdio-1.0
392 hs-source-dirs: benchmark
393 main-is: LinearAsync.hs
394 other-modules: LinearOps
395 default-language: Haskell2010
396 ghc-options: -O2 -Wall -fspec-constr-recursive=10
397 cpp-options: -DLINEAR_ASYNC
399 ghc-options: -Wmissed-specialisations
400 -Wall-missed-specialisations
403 ghc-options: -Wcompat
404 -Wunrecognised-warning-flags
406 -Wincomplete-record-updates
407 -Wincomplete-uni-patterns
408 -Wredundant-constraints
409 -Wnoncanonical-monad-instances
410 -Wnoncanonical-monadfail-instances
414 , deepseq >= 1.4.3 && < 1.5
415 , random >= 1.0 && < 2.0
416 , gauge >= 0.2.4 && < 0.3
419 type: exitcode-stdio-1.0
420 hs-source-dirs: benchmark
421 main-is: LinearRate.hs
422 other-modules: LinearOps
423 default-language: Haskell2010
424 ghc-options: -O2 -Wall -fspec-constr-recursive=10
426 ghc-options: -Wmissed-specialisations
427 -Wall-missed-specialisations
430 ghc-options: -Wcompat
431 -Wunrecognised-warning-flags
433 -Wincomplete-record-updates
434 -Wincomplete-uni-patterns
435 -Wredundant-constraints
436 -Wnoncanonical-monad-instances
437 -Wnoncanonical-monadfail-instances
441 , deepseq >= 1.4.3 && < 1.5
442 , random >= 1.0 && < 2.0
443 , gauge >= 0.2.4 && < 0.3
446 type: exitcode-stdio-1.0
447 hs-source-dirs: benchmark
449 other-modules: NestedOps
450 default-language: Haskell2010
451 ghc-options: -O2 -Wall -fspec-constr-recursive=10
453 ghc-options: -Wmissed-specialisations
454 -Wall-missed-specialisations
457 ghc-options: -Wcompat
458 -Wunrecognised-warning-flags
460 -Wincomplete-record-updates
461 -Wincomplete-uni-patterns
462 -Wredundant-constraints
463 -Wnoncanonical-monad-instances
464 -Wnoncanonical-monadfail-instances
468 , deepseq >= 1.4.3 && < 1.5
469 , random >= 1.0 && < 2.0
470 , gauge >= 0.2.4 && < 0.3
472-------------------------------------------------------------------------------
473-- Internal benchmarks for unexposed modules
474-------------------------------------------------------------------------------
476-- We have to copy the streamly library modules here because there is no
477-- way to use unexposed modules from the library.
480 type: exitcode-stdio-1.0
481 hs-source-dirs: benchmark, src
482 main-is: BaseStreams.hs
483 other-modules: Streamly.SVar
484 , Streamly.Streams.StreamK
485 , Streamly.Streams.StreamD
486 , Streamly.Streams.Prelude
491 default-language: Haskell2010
492 ghc-options: -O2 -Wall -fspec-constr-recursive=10
494 ghc-options: -Wmissed-specialisations
495 -Wall-missed-specialisations
498 ghc-options: -Wcompat
499 -Wunrecognised-warning-flags
501 -Wincomplete-record-updates
502 -Wincomplete-uni-patterns
503 -Wredundant-constraints
504 -Wnoncanonical-monad-instances
505 -Wnoncanonical-monadfail-instances
511 , deepseq >= 1.4.3 && < 1.5
512 , random >= 1.0 && < 2.0
513 , gauge >= 0.2.4 && < 0.3
515 , ghc-prim >= 0.2 && < 0.6
516 , containers >= 0.5 && < 0.7
517 , heaps >= 0.3 && < 0.4
520 , atomic-primops >= 0.8 && < 0.9
521 , lockfree-queue >= 0.2.3 && < 0.3
522 , clock >= 0.7.1 && < 0.8
524 , exceptions >= 0.8 && < 0.11
525 , monad-control >= 1.0 && < 2
527 , transformers >= 0.4 && < 0.6
528 , transformers-base >= 0.4 && < 0.5
532 semigroups >= 0.18 && < 0.19
537 hs-source-dirs: benchmark, src
538 main-is: NanoBenchmarks.hs
539 other-modules: Streamly.SVar
540 , Streamly.Streams.StreamK
541 , Streamly.Streams.StreamD
542 default-language: Haskell2010
543 ghc-options: -O2 -Wall
549 , gauge >= 0.2.4 && < 0.3
550 , ghc-prim >= 0.2 && < 0.6
551 , containers >= 0.5 && < 0.7
552 , heaps >= 0.3 && < 0.4
555 , atomic-primops >= 0.8 && < 0.9
556 , lockfree-queue >= 0.2.3 && < 0.3
557 , clock >= 0.7.1 && < 0.8
559 , exceptions >= 0.8 && < 0.11
560 , monad-control >= 1.0 && < 2
562 , transformers >= 0.4 && < 0.6
567 hs-source-dirs: benchmark
569 default-language: Haskell2010
570 ghc-options: -O2 -Wall
577 , gauge >= 0.2.4 && < 0.3
578 , random >= 1.0 && < 2.0
583 default-language: Haskell2010
584 hs-source-dirs: benchmark
590 , bench-show >= 0.2 && < 0.3
592 , transformers >= 0.4 && < 0.6
596-------------------------------------------------------------------------------
598-------------------------------------------------------------------------------
600executable SearchQuery
601 default-language: Haskell2010
602 main-is: SearchQuery.hs
603 hs-source-dirs: examples
604 if flag(examples) || flag(examples-sdl)
609 , http-conduit >= 2.2.2 && < 2.4
614 default-language: Haskell2010
616 hs-source-dirs: examples
617 if flag(examples) || flag(examples-sdl)
622 , path-io >= 0.1.0 && < 1.4
625 transformers >= 0.4 && < 0.6
630 default-language: Haskell2010
631 main-is: MergeSort.hs
632 hs-source-dirs: examples
633 if flag(examples) || flag(examples-sdl)
638 , random >= 1.0.0 && < 2
643 default-language: Haskell2010
645 hs-source-dirs: examples
646 if flag(examples) || flag(examples-sdl)
654 semigroups >= 0.18 && < 0.19
655 , transformers >= 0.4 && < 0.6
659executable CirclingSquare
660 default-language: Haskell2010
661 main-is: CirclingSquare.hs
662 hs-source-dirs: examples
663 if flag(examples-sdl)
668 , SDL >= 0.6.5 && < 0.7
672executable ControlFlow
673 default-language: Haskell2010
674 main-is: ControlFlow.hs
675 hs-source-dirs: examples
676 if flag(examples) || flag(examples-sdl)
681 , exceptions >= 0.8 && < 0.11
682 , transformers >= 0.4 && < 0.6
683 , transformers-base >= 0.4 && < 0.5
686 semigroups >= 0.18 && < 0.19
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list