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
132 , Streamly.Streams.StreamDType
133 , Streamly.Streams.StreamD
134 , Streamly.Streams.Prelude
136 -- Higher level streams
137 , Streamly.Streams.SVar
138 , Streamly.Streams.Serial
139 , Streamly.Streams.Async
140 , Streamly.Streams.Parallel
141 , Streamly.Streams.Ahead
142 , Streamly.Streams.Zip
143 , Streamly.Streams.Combinators
145 exposed-modules: Streamly.Prelude
153 default-language: Haskell2010
154 ghc-options: -Wall -fspec-constr-recursive=10
157 cpp-options: -DUSE_STREAMK_ONLY
160 cpp-options: -DDISABLE_FUSION
163 ghc-options: -Wmissed-specialisations
164 -Wall-missed-specialisations
167 ghc-options: -Wcompat
168 -Wunrecognised-warning-flags
170 -Wincomplete-record-updates
171 -Wincomplete-uni-patterns
172 -Wredundant-constraints
173 -Wnoncanonical-monad-instances
174 -Wnoncanonical-monadfail-instances
176 build-depends: base >= 4.8 && < 5
177 , ghc-prim >= 0.2 && < 0.6
178 , deepseq >= 1.4.3 && < 1.5
179 , containers >= 0.5 && < 0.7
180 , heaps >= 0.3 && < 0.4
183 , atomic-primops >= 0.8 && < 0.9
184 , lockfree-queue >= 0.2.3 && < 0.3
185 , clock >= 0.7.1 && < 0.8
188 , exceptions >= 0.8 && < 0.11
189 , monad-control >= 1.0 && < 2
191 , transformers >= 0.4 && < 0.6
192 , transformers-base >= 0.4 && < 0.5
196 semigroups >= 0.18 && < 0.19
198-------------------------------------------------------------------------------
200-------------------------------------------------------------------------------
202-- Compilation for coverage builds on CI machines takes too long without -O0
205 type: exitcode-stdio-1.0
208 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
210 cpp-options: -DDEVBUILD
211 ghc-options: -Wmissed-specialisations
212 -Wall-missed-specialisations
214 ghc-options: -Wcompat
215 -Wunrecognised-warning-flags
217 -Wincomplete-record-updates
218 -Wincomplete-uni-patterns
219 -Wredundant-constraints
220 -Wnoncanonical-monad-instances
221 -Wnoncanonical-monadfail-instances
225 , hspec >= 2.0 && < 3
226 , containers >= 0.5 && < 0.7
227 , transformers >= 0.4 && < 0.6
229 , exceptions >= 0.8 && < 0.11
230 default-language: Haskell2010
232test-suite pure-streams-base
233 type: exitcode-stdio-1.0
234 main-is: PureStreams.hs
236 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
238 cpp-options: -DDEVBUILD
239 ghc-options: -Wmissed-specialisations
240 -Wall-missed-specialisations
242 ghc-options: -Wcompat
243 -Wunrecognised-warning-flags
245 -Wincomplete-record-updates
246 -Wincomplete-uni-patterns
247 -Wredundant-constraints
248 -Wnoncanonical-monad-instances
249 -Wnoncanonical-monadfail-instances
253 , hspec >= 2.0 && < 3
254 default-language: Haskell2010
256test-suite pure-streams-streamly
257 type: exitcode-stdio-1.0
258 main-is: PureStreams.hs
260 cpp-options: -DUSE_STREAMLY_LIST
261 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
263 cpp-options: -DDEVBUILD
264 ghc-options: -Wmissed-specialisations
265 -Wall-missed-specialisations
267 ghc-options: -Wcompat
268 -Wunrecognised-warning-flags
270 -Wincomplete-record-updates
271 -Wincomplete-uni-patterns
272 -Wredundant-constraints
273 -Wnoncanonical-monad-instances
274 -Wnoncanonical-monadfail-instances
278 , hspec >= 2.0 && < 3
279 default-language: Haskell2010
282 type: exitcode-stdio-1.0
285 ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
287 cpp-options: -DDEVBUILD
288 ghc-options: -Wmissed-specialisations
289 -Wall-missed-specialisations
291 ghc-options: -Wcompat
292 -Wunrecognised-warning-flags
294 -Wincomplete-record-updates
295 -Wincomplete-uni-patterns
296 -Wredundant-constraints
297 -Wnoncanonical-monad-instances
298 -Wnoncanonical-monadfail-instances
302 , QuickCheck >= 2.10 && < 2.13
303 , hspec >= 2.0 && < 3
306 transformers >= 0.4 && < 0.6
307 default-language: Haskell2010
310 type: exitcode-stdio-1.0
311 default-language: Haskell2010
314 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
320 , clock >= 0.7.1 && < 0.8
321 , hspec >= 2.0 && < 3
322 , random >= 1.0.0 && < 2
327 type: exitcode-stdio-1.0
328 default-language: Haskell2010
331 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
336test-suite nested-loops
337 type: exitcode-stdio-1.0
338 default-language: Haskell2010
339 main-is: nested-loops.hs
341 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
345 , random >= 1.0.0 && < 2
347test-suite parallel-loops
348 type: exitcode-stdio-1.0
349 default-language: Haskell2010
350 main-is: parallel-loops.hs
352 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
356 , random >= 1.0.0 && < 2
358-------------------------------------------------------------------------------
360-------------------------------------------------------------------------------
363 type: exitcode-stdio-1.0
364 hs-source-dirs: benchmark
366 other-modules: LinearOps
367 default-language: Haskell2010
368 ghc-options: -O2 -Wall -fspec-constr-recursive=10
370 ghc-options: -Wmissed-specialisations
371 -Wall-missed-specialisations
374 ghc-options: -Wcompat
375 -Wunrecognised-warning-flags
377 -Wincomplete-record-updates
378 -Wincomplete-uni-patterns
379 -Wredundant-constraints
380 -Wnoncanonical-monad-instances
381 -Wnoncanonical-monadfail-instances
385 , deepseq >= 1.4.3 && < 1.5
386 , random >= 1.0 && < 2.0
387 , gauge >= 0.2.4 && < 0.3
389benchmark linear-async
390 type: exitcode-stdio-1.0
391 hs-source-dirs: benchmark
392 main-is: LinearAsync.hs
393 other-modules: LinearOps
394 default-language: Haskell2010
395 ghc-options: -O2 -Wall -fspec-constr-recursive=10
396 cpp-options: -DLINEAR_ASYNC
398 ghc-options: -Wmissed-specialisations
399 -Wall-missed-specialisations
402 ghc-options: -Wcompat
403 -Wunrecognised-warning-flags
405 -Wincomplete-record-updates
406 -Wincomplete-uni-patterns
407 -Wredundant-constraints
408 -Wnoncanonical-monad-instances
409 -Wnoncanonical-monadfail-instances
413 , deepseq >= 1.4.3 && < 1.5
414 , random >= 1.0 && < 2.0
415 , gauge >= 0.2.4 && < 0.3
418 type: exitcode-stdio-1.0
419 hs-source-dirs: benchmark
420 main-is: LinearRate.hs
421 other-modules: LinearOps
422 default-language: Haskell2010
423 ghc-options: -O2 -Wall -fspec-constr-recursive=10
425 ghc-options: -Wmissed-specialisations
426 -Wall-missed-specialisations
429 ghc-options: -Wcompat
430 -Wunrecognised-warning-flags
432 -Wincomplete-record-updates
433 -Wincomplete-uni-patterns
434 -Wredundant-constraints
435 -Wnoncanonical-monad-instances
436 -Wnoncanonical-monadfail-instances
440 , deepseq >= 1.4.3 && < 1.5
441 , random >= 1.0 && < 2.0
442 , gauge >= 0.2.4 && < 0.3
445 type: exitcode-stdio-1.0
446 hs-source-dirs: benchmark
448 other-modules: NestedOps
449 default-language: Haskell2010
450 ghc-options: -O2 -Wall -fspec-constr-recursive=10
452 ghc-options: -Wmissed-specialisations
453 -Wall-missed-specialisations
456 ghc-options: -Wcompat
457 -Wunrecognised-warning-flags
459 -Wincomplete-record-updates
460 -Wincomplete-uni-patterns
461 -Wredundant-constraints
462 -Wnoncanonical-monad-instances
463 -Wnoncanonical-monadfail-instances
467 , deepseq >= 1.4.3 && < 1.5
468 , random >= 1.0 && < 2.0
469 , gauge >= 0.2.4 && < 0.3
471-------------------------------------------------------------------------------
472-- Internal benchmarks for unexposed modules
473-------------------------------------------------------------------------------
475-- We have to copy the streamly library modules here because there is no
476-- way to use unexposed modules from the library.
479 type: exitcode-stdio-1.0
480 hs-source-dirs: benchmark, src
481 main-is: BaseStreams.hs
482 other-modules: Streamly.SVar
483 , Streamly.Streams.StreamK
484 , Streamly.Streams.StreamD
485 , Streamly.Streams.Prelude
490 default-language: Haskell2010
491 ghc-options: -O2 -Wall -fspec-constr-recursive=10
493 ghc-options: -Wmissed-specialisations
494 -Wall-missed-specialisations
497 ghc-options: -Wcompat
498 -Wunrecognised-warning-flags
500 -Wincomplete-record-updates
501 -Wincomplete-uni-patterns
502 -Wredundant-constraints
503 -Wnoncanonical-monad-instances
504 -Wnoncanonical-monadfail-instances
510 , deepseq >= 1.4.3 && < 1.5
511 , random >= 1.0 && < 2.0
512 , gauge >= 0.2.4 && < 0.3
514 , ghc-prim >= 0.2 && < 0.6
515 , containers >= 0.5 && < 0.7
516 , heaps >= 0.3 && < 0.4
519 , atomic-primops >= 0.8 && < 0.9
520 , lockfree-queue >= 0.2.3 && < 0.3
521 , clock >= 0.7.1 && < 0.8
523 , exceptions >= 0.8 && < 0.11
524 , monad-control >= 1.0 && < 2
526 , transformers >= 0.4 && < 0.6
527 , transformers-base >= 0.4 && < 0.5
531 semigroups >= 0.18 && < 0.19
536 hs-source-dirs: benchmark, src
537 main-is: NanoBenchmarks.hs
538 other-modules: Streamly.SVar
539 , Streamly.Streams.StreamK
540 , Streamly.Streams.StreamD
541 default-language: Haskell2010
542 ghc-options: -O2 -Wall
548 , gauge >= 0.2.4 && < 0.3
549 , ghc-prim >= 0.2 && < 0.6
550 , containers >= 0.5 && < 0.7
551 , heaps >= 0.3 && < 0.4
554 , atomic-primops >= 0.8 && < 0.9
555 , lockfree-queue >= 0.2.3 && < 0.3
556 , clock >= 0.7.1 && < 0.8
558 , exceptions >= 0.8 && < 0.11
559 , monad-control >= 1.0 && < 2
561 , transformers >= 0.4 && < 0.6
566 hs-source-dirs: benchmark
568 default-language: Haskell2010
569 ghc-options: -O2 -Wall
576 , gauge >= 0.2.4 && < 0.3
577 , random >= 1.0 && < 2.0
582 default-language: Haskell2010
583 hs-source-dirs: benchmark
589 , bench-show >= 0.2 && < 0.3
591 , transformers >= 0.4 && < 0.6
595-------------------------------------------------------------------------------
597-------------------------------------------------------------------------------
599executable SearchQuery
600 default-language: Haskell2010
601 main-is: SearchQuery.hs
602 hs-source-dirs: examples
603 if flag(examples) || flag(examples-sdl)
608 , http-conduit >= 2.2.2 && < 2.4
613 default-language: Haskell2010
615 hs-source-dirs: examples
616 if flag(examples) || flag(examples-sdl)
621 , path-io >= 0.1.0 && < 1.4
624 transformers >= 0.4 && < 0.6
629 default-language: Haskell2010
630 main-is: MergeSort.hs
631 hs-source-dirs: examples
632 if flag(examples) || flag(examples-sdl)
637 , random >= 1.0.0 && < 2
642 default-language: Haskell2010
644 hs-source-dirs: examples
645 if flag(examples) || flag(examples-sdl)
653 semigroups >= 0.18 && < 0.19
654 , transformers >= 0.4 && < 0.6
658executable CirclingSquare
659 default-language: Haskell2010
660 main-is: CirclingSquare.hs
661 hs-source-dirs: examples
662 if flag(examples-sdl)
667 , SDL >= 0.6.5 && < 0.7
671executable ControlFlow
672 default-language: Haskell2010
673 main-is: ControlFlow.hs
674 hs-source-dirs: examples
675 if flag(examples) || flag(examples-sdl)
680 , exceptions >= 0.8 && < 0.11
681 , transformers >= 0.4 && < 0.6
682 , transformers-base >= 0.4 && < 0.5
685 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