on a3c6ad3 help sign in
streamly/streamly.cabal
1084 lines 34 kB history raw
1cabal-version: 2.2
2name: streamly
3version: 0.7.0
4synopsis: Beautiful Streaming, Concurrent and Reactive Composition
5description:
6 Streamly is a framework for writing programs in a high level, declarative
7 data flow programming paradigm. It provides a simple API, very close to
8 standard Haskell lists. A program is expressed as a composition of data
9 processing pipes, generally known as streams. Streams can be generated,
10 merged, chained, mapped, zipped, and consumed concurrently – enabling a high
11 level, declarative yet concurrent composition of programs. Programs can be
12 concurrent or non-concurrent without any significant change. Concurrency is
13 auto scaled based on consumption rate. Programmers do not have to be aware
14 of threads, locking or synchronization to write scalable concurrent programs.
15 Streamly provides C like performance, orders of magnitude better compared to
16 existing streaming libraries.
17 .
18 Streamly is designed to express the full spectrum of programs with highest
19 performance. Do not think that if you are writing a small and simple program
20 it may not be for you. It expresses a small "hello world" program with the
21 same efficiency, simplicity and elegance as a large scale concurrent
22 application. It unifies many different aspects of special purpose libraries
23 into a single yet simple framework.
24 .
25 Streamly covers the functionality provided by Haskell lists as well as the
26 functionality provided by streaming libraries like
27 <https://hackage.haskell.org/package/streaming streaming>,
28 <https://hackage.haskell.org/package/pipes pipes>, and
29 <https://hackage.haskell.org/package/conduit conduit> with a simpler API and
30 better performance. Streamly provides
31 advanced stream composition including various ways of appending, merging,
32 zipping, splitting, grouping, distributing, partitioning and unzipping of
33 streams with true streaming and with concurrency. Streamly subsumes the
34 functionality of list transformer libraries like @pipes@ or
35 <https://hackage.haskell.org/package/list-t list-t> and also the logic
36 programming library <https://hackage.haskell.org/package/logict logict>.
37 The grouping, splitting and windowing combinators in streamly can be compared
38 to the window operators in <https://flink.apache.org/ Apache Flink>.
39 However, compared to Flink streamly has a pure functional, succinct and
40 expressive API.
41 .
42 The concurrency capabilities of streamly are much more advanced and powerful
43 compared to the basic concurrency functionality provided by the
44 <https://hackage.haskell.org/package/async async> package. Streamly is a
45 first class reactive programming library. If you are familiar with
46 <http://reactivex.io/ Reactive Extensions> you will find that it is very
47 similar. For most RxJs combinators you can find or write corresponding ones
48 in streamly. Streamly can be used as an alternative to
49 <https://hackage.haskell.org/package/Yampa Yampa> or
50 <https://hackage.haskell.org/package/reflex reflex> as well.
51 .
52 Streamly focuses on practical engineering with high performance. From well
53 written streamly programs one can expect performance competitive to C. High
54 performance streaming eliminates the need for string and text libraries like
55 <https://hackage.haskell.org/package/bytestring bytestring>,
56 <https://hackage.haskell.org/package/text text> and their lazy and strict
57 flavors. The confusion and cognitive overhead arising from different
58 string types is eliminated. The two fundamental types in streamly are arrays
59 for storage and streams for processing. Strings and text are simply streams
60 or arrays of 'Char' as they should be. Arrays in streamly have performance
61 at par with the vector library.
62 .
63 Where to find more information:
64 .
65 * /Quick Overview/: <#readme README file> in the package
66 * /Building/: <src/docs/Build.md Build guide> for optimal performance
67 * /Detailed Tutorial/: "Streamly.Tutorial" module in the haddock documentation
68 * /Interoperation/: "Streamly.Tutorial" module for interop with other
69 streaming libraries
70 * /Reference Documentation/: Haddock documentation for the respective modules
71 * /Examples/: <src/examples examples directory> in the package
72 * /Guides/: <src/docs docs directory> in the package, for documentation on
73 advanced topics, limitations, semantics of the library or on specific use
74 cases.
75 * <https://github.com/composewell/streaming-benchmarks Streaming Benchmarks>
76 * <https://github.com/composewell/concurrency-benchmarks Concurrency Benchmarks>
77 .
80homepage: https://github.com/composewell/streamly
81bug-reports: https://github.com/composewell/streamly/issues
82license: BSD-3-Clause
83license-file: LICENSE
84tested-with: GHC==7.10.3
85 , GHC==8.0.2
86 , GHC==8.4.4
87 , GHC==8.6.5
88 , GHC==8.8.1
89author: Harendra Kumar
90maintainer: streamly@composewell.com
91copyright: 2017 Harendra Kumar
92category: Control, Concurrency, Streaming, Reactivity
93stability: Experimental
94build-type: Configure
96extra-source-files:
97 Changelog.md
98 credits/*.md
99 credits/base-4.12.0.0.txt
100 credits/bjoern-2008-2009.txt
101 credits/clock-0.7.2.txt
102 credits/foldl-1.4.5.txt
103 credits/pipes-concurrency-2.0.8.txt
104 credits/pipes-concurrency.txt
105 credits/transient-0.5.5.txt
106 credits/vector-0.12.0.2.txt
107 credits/Yampa-0.10.6.2.txt
108 README.md
109 docs/streamly-vs-async.md
110 docs/streamly-vs-lists.md
111 docs/transformers.md
112 docs/Build.md
113 design/*.md
114 design/*.png
115 bench.sh
116 stack.yaml
117 src/Streamly/Internal/Data/Stream/Instances.hs
118 src/inline.hs
119 configure.ac
120 configure
121 src/Streamly/Internal/Data/Time/config.h.in
123extra-tmp-files:
124 config.log
125 config.status
126 autom4te.cache
127 src/Streamly/Internal/Data/Time/config.h
129source-repository head
130 type: git
131 location: https://github.com/composewell/streamly
133flag inspection
134 description: Enable inspection testing
135 manual: True
136 default: False
138flag debug
139 description: Debug build with asserts enabled
140 manual: True
141 default: False
143flag dev
144 description: Development build
145 manual: True
146 default: False
148flag has-llvm
149 description: Use llvm backend for better performance
150 manual: True
151 default: False
153flag no-charts
154 description: Disable chart generation
155 manual: True
156 default: False
158flag no-fusion
159 description: Disable rewrite rules
160 manual: True
161 default: False
163flag streamk
164 description: Use CPS style streams when possible
165 manual: True
166 default: False
168flag examples
169 description: Build including examples
170 manual: True
171 default: False
173flag examples-sdl
174 description: Build including SDL examples
175 manual: True
176 default: False
178-------------------------------------------------------------------------------
179-- Common stanzas
180-------------------------------------------------------------------------------
182common compile-options
183 default-language: Haskell2010
184 if flag(streamk)
185 cpp-options: -DUSE_STREAMK_ONLY
187 if flag(no-fusion)
188 cpp-options: -DDISABLE_FUSION
190 if flag(dev)
191 cpp-options: -DDEVBUILD
193 if flag(inspection)
194 cpp-options: -DINSPECTION
196 ghc-options: -Wall
198 if flag(has-llvm)
199 ghc-options: -fllvm
201 if flag(dev)
202 ghc-options: -Wmissed-specialisations
203 -Wall-missed-specialisations
205 if flag(dev) || flag(debug)
206 ghc-options: -fno-ignore-asserts
208 if impl(ghc >= 8.0)
209 ghc-options: -Wcompat
210 -Wunrecognised-warning-flags
211 -Widentities
212 -Wincomplete-record-updates
213 -Wincomplete-uni-patterns
214 -Wredundant-constraints
215 -Wnoncanonical-monad-instances
217common optimization-options
218 ghc-options: -O2
219 -fspec-constr-recursive=16
220 -fmax-worker-args=16
222common threading-options
223 ghc-options: -threaded
224 -with-rtsopts=-N
226-- We need optimization options here to optimize internal (non-inlined)
227-- versions of functions. Also, we have some benchmarking inspection tests
228-- part of the library when built with --benchmarks flag. Thos tests fail
229-- if we do not use optimization options here. It was observed that due to
230-- -O2 here some concurrent/nested benchmarks improved and others regressed.
231-- We can investigate a bit more here why the regression occurred.
232common lib-options
233 import: compile-options, optimization-options
235-- Compilation for coverage builds on CI machines takes too long without -O0
236-- XXX we should use coverage flag for that, -O0 may take too long to run tests
237-- in general.
238common test-options
239 import: compile-options, threading-options
240 ghc-options: -O0
241 -fno-ignore-asserts
243-- Used by maxrate test, benchmarks and executables
244common exe-options
245 import: compile-options, optimization-options, threading-options
247-- Some benchmarks are threaded some are not
248-- XXX dependencies should be separated under bench-depends
249common bench-options
250 import: compile-options, optimization-options
251 ghc-options: -with-rtsopts "-T -M256M"
252 build-depends: mtl >= 2.2 && < 3
254common bench-options-threaded
255 import: compile-options, optimization-options
256 -- -threaded and -N2 is important because some GC and space leak issues
257 -- trigger only with these options.
258 ghc-options: -threaded -with-rtsopts "-T -N2 -M256M"
259 build-depends: mtl >= 2.2 && < 3
261-------------------------------------------------------------------------------
262-- Library
263-------------------------------------------------------------------------------
265library
266 import: lib-options
267 js-sources: jsbits/clock.js
268 include-dirs: src/Streamly/Internal/Data/Time
269 , src
270 if os(windows)
271 c-sources: src/Streamly/Internal/Data/Time/Windows.c
272 if os(darwin)
273 c-sources: src/Streamly/Internal/Data/Time/Darwin.c
274 hs-source-dirs: src
275 other-modules:
276 Streamly.Data.Array
277 , Streamly.Data.SmallArray
279 -- Memory storage
280 Streamly.Memory.Malloc
281 , Streamly.Memory.Ring
283 , Streamly.FileSystem.IOVec
284 , Streamly.FileSystem.FDIO
285 , Streamly.FileSystem.FD
287 exposed-modules:
288 Streamly.Prelude
289 , Streamly
290 , Streamly.Data.Fold
291 , Streamly.Data.Unfold
292 , Streamly.Data.Unicode.Stream
294 -- IO devices
295 , Streamly.Memory.Array
296 , Streamly.FileSystem.Handle
298 , Streamly.Tutorial
300 -- Internal modules
301 , Streamly.Internal.Control.Monad
302 , Streamly.Internal.Data.Strict
303 , Streamly.Internal.Data.Atomics
304 , Streamly.Internal.Data.Time
305 , Streamly.Internal.Data.Time.Units
306 , Streamly.Internal.Data.Time.Clock
307 , Streamly.Internal.Data.SVar
308 , Streamly.Internal.Data.Array
309 , Streamly.Internal.Data.SmallArray
310 , Streamly.Internal.Memory.Array.Types
311 , Streamly.Internal.Memory.Array
312 , Streamly.Internal.Memory.ArrayStream
313 , Streamly.Internal.Data.Fold.Types
314 , Streamly.Internal.Data.Fold
315 , Streamly.Internal.Data.Sink.Types
316 , Streamly.Internal.Data.Sink
318 -- Base streams
319 , Streamly.Internal.Data.Stream.StreamK.Type
320 , Streamly.Internal.Data.Stream.StreamK
321 , Streamly.Internal.Data.Stream.StreamD.Type
322 , Streamly.Internal.Data.Stream.StreamD
323 , Streamly.Internal.Data.Stream.StreamDK.Type
324 , Streamly.Internal.Data.Stream.StreamDK
325 , Streamly.Internal.Data.Stream.Enumeration
326 , Streamly.Internal.Data.Stream.Prelude
328 -- Higher level streams
329 , Streamly.Internal.Data.Stream.SVar
330 , Streamly.Internal.Data.Stream.Serial
331 , Streamly.Internal.Data.Stream.Async
332 , Streamly.Internal.Data.Stream.Parallel
333 , Streamly.Internal.Data.Stream.Ahead
334 , Streamly.Internal.Data.Stream.Zip
335 , Streamly.Internal.Data.Stream.Combinators
336 , Streamly.Internal.Data.Unfold.Types
337 , Streamly.Internal.Data.Unfold
338 , Streamly.Internal.Data.Pipe.Types
339 , Streamly.Internal.Data.Pipe
340 , Streamly.Internal.Data.List
341 , Streamly.Internal.FileSystem.Handle
342 , Streamly.Internal.FileSystem.Dir
343 , Streamly.Internal.FileSystem.File
344 , Streamly.Internal.Data.Unicode.Stream
345 , Streamly.Internal.Data.Unicode.Char
346 , Streamly.Internal.Memory.Unicode.Array
347 , Streamly.Internal.Prelude
349 -- Mutable data
350 , Streamly.Internal.Mutable.Prim.Var
352 if !impl(ghcjs)
353 exposed-modules:
354 Streamly.Network.Socket
355 , Streamly.Network.Inet.TCP
357 , Streamly.Internal.Network.Socket
358 , Streamly.Internal.Network.Inet.TCP
360 build-depends:
361 -- Core libraries shipped with ghc, the min and max
362 -- constraints of these libraries should match with
363 -- the GHC versions we support
364 base >= 4.8 && < 5
365 , containers >= 0.5 && < 0.7
366 , deepseq >= 1.4.1 && < 1.5
367 , directory >= 1.3 && < 1.4
368 , ghc-prim >= 0.2 && < 0.6
369 , transformers >= 0.4 && < 0.6
371 , heaps >= 0.3 && < 0.4
372 , primitive >= 0.6.4.0 && < 0.8
374 -- concurrency
375 , atomic-primops >= 0.8 && < 0.9
376 , lockfree-queue >= 0.2.3 && < 0.3
378 -- transfomers
379 , exceptions >= 0.8 && < 0.11
380 , monad-control >= 1.0 && < 2
381 , mtl >= 2.2 && < 3
382 , transformers-base >= 0.4 && < 0.5
384 if !impl(ghcjs)
385 build-depends:
386 network >= 2.6 && < 4
387 if impl(ghc < 8.0)
388 build-depends:
389 semigroups >= 0.18 && < 0.19
391 -- Array uses a Storable constraint in dev build making several inspection
392 -- tests fail
393 if flag(dev) && flag(inspection)
394 build-depends: inspection-and-dev-flags-cannot-be-used-together
396-------------------------------------------------------------------------------
397-- Test suites
398-------------------------------------------------------------------------------
400test-suite test
401 import: test-options
402 type: exitcode-stdio-1.0
403 main-is: Main.hs
404 js-sources: jsbits/clock.js
405 hs-source-dirs: test
406 build-depends:
407 streamly
408 , base >= 4.8 && < 5
409 , hspec >= 2.0 && < 3
410 , containers >= 0.5 && < 0.7
411 , transformers >= 0.4 && < 0.6
412 , mtl >= 2.2 && < 3
413 , exceptions >= 0.8 && < 0.11
414 default-language: Haskell2010
416test-suite internal-prelude-test
417 import: test-options
418 type: exitcode-stdio-1.0
419 main-is: Streamly/Test/Internal/Prelude.hs
420 js-sources: jsbits/clock.js
421 hs-source-dirs: test
422 build-depends:
423 streamly
424 , base >= 4.8 && < 5
425 , QuickCheck >= 2.10 && < 2.14
426 , hspec >= 2.0 && < 3
427 default-language: Haskell2010
429test-suite pure-streams-base
430 import: test-options
431 type: exitcode-stdio-1.0
432 main-is: PureStreams.hs
433 hs-source-dirs: test
434 build-depends:
435 streamly
436 , base >= 4.8 && < 5
437 , hspec >= 2.0 && < 3
438 default-language: Haskell2010
440test-suite pure-streams-streamly
441 import: test-options
442 type: exitcode-stdio-1.0
443 main-is: PureStreams.hs
444 hs-source-dirs: test
445 cpp-options: -DUSE_STREAMLY_LIST
446 build-depends:
447 streamly
448 , base >= 4.8 && < 5
449 , hspec >= 2.0 && < 3
450 default-language: Haskell2010
452test-suite properties
453 import: test-options
454 type: exitcode-stdio-1.0
455 main-is: Prop.hs
456 js-sources: jsbits/clock.js
457 hs-source-dirs: test
458 build-depends:
459 streamly
460 , base >= 4.8 && < 5
461 , QuickCheck >= 2.10 && < 2.14
462 , hspec >= 2.0 && < 3
463 if impl(ghc < 8.0)
464 build-depends:
465 transformers >= 0.4 && < 0.6
466 default-language: Haskell2010
468test-suite array-test
469 import: test-options
470 type: exitcode-stdio-1.0
471 main-is: Streamly/Test/Array.hs
472 js-sources: jsbits/clock.js
473 hs-source-dirs: test
474 cpp-options: -DTEST_ARRAY
475 build-depends:
476 streamly
477 , base >= 4.8 && < 5
478 , QuickCheck >= 2.10 && < 2.14
479 , hspec >= 2.0 && < 3
480 if impl(ghc < 8.0)
481 build-depends:
482 transformers >= 0.4 && < 0.6
483 default-language: Haskell2010
485test-suite internal-data-fold-test
486 import: test-options
487 type: exitcode-stdio-1.0
488 main-is: Streamly/Test/Internal/Data/Fold.hs
489 js-sources: jsbits/clock.js
490 hs-source-dirs: test
491 build-depends:
492 streamly
493 , base >= 4.8 && < 5
494 , hspec >= 2.0 && < 3
495 , QuickCheck >= 2.10 && < 2.14
496 default-language: Haskell2010
498test-suite data-array-test
499 import: test-options
500 type: exitcode-stdio-1.0
501 main-is: Streamly/Test/Array.hs
502 js-sources: jsbits/clock.js
503 hs-source-dirs: test
504 build-depends:
505 streamly
506 , base >= 4.8 && < 5
507 , QuickCheck >= 2.10 && < 2.14
508 , hspec >= 2.0 && < 3
509 if impl(ghc < 8.0)
510 build-depends:
511 transformers >= 0.4 && < 0.6
512 default-language: Haskell2010
514test-suite smallarray-test
515 import: test-options
516 type: exitcode-stdio-1.0
517 main-is: Streamly/Test/Array.hs
518 js-sources: jsbits/clock.js
519 hs-source-dirs: test
520 cpp-options: -DTEST_SMALL_ARRAY
521 build-depends:
522 streamly
523 , base >= 4.8 && < 5
524 , QuickCheck >= 2.10 && < 2.14
525 , hspec >= 2.0 && < 3
526 if impl(ghc < 8.0)
527 build-depends:
528 transformers >= 0.4 && < 0.6
529 default-language: Haskell2010
531test-suite string-test
532 import: test-options
533 type: exitcode-stdio-1.0
534 main-is: String.hs
535 js-sources: jsbits/clock.js
536 hs-source-dirs: test
537 build-depends:
538 streamly
539 , base >= 4.8 && < 5
540 , QuickCheck >= 2.10 && < 2.14
541 , hspec >= 2.0 && < 3
542 if impl(ghc < 8.0)
543 build-depends:
544 transformers >= 0.4 && < 0.6
545 default-language: Haskell2010
547test-suite maxrate
548 import: exe-options
549 type: exitcode-stdio-1.0
550 default-language: Haskell2010
551 main-is: MaxRate.hs
552 js-sources: jsbits/clock.js
553 hs-source-dirs: test
554 if flag(dev)
555 buildable: True
556 build-Depends:
557 streamly
558 , base >= 4.8 && < 5
559 , clock >= 0.7.1 && < 0.9
560 , hspec >= 2.0 && < 3
561 , random >= 1.0.0 && < 2
562 else
563 buildable: False
565test-suite loops
566 import: test-options
567 type: exitcode-stdio-1.0
568 default-language: Haskell2010
569 main-is: loops.hs
570 hs-source-dirs: test
571 build-Depends:
572 streamly
573 , base >= 4.8 && < 5
575test-suite nested-loops
576 import: test-options
577 type: exitcode-stdio-1.0
578 default-language: Haskell2010
579 main-is: nested-loops.hs
580 hs-source-dirs: test
581 build-Depends:
582 streamly
583 , base >= 4.8 && < 5
584 , random >= 1.0.0 && < 2
586test-suite parallel-loops
587 import: test-options
588 type: exitcode-stdio-1.0
589 default-language: Haskell2010
590 main-is: parallel-loops.hs
591 hs-source-dirs: test
592 build-Depends:
593 streamly
594 , base >= 4.8 && < 5
595 , random >= 1.0.0 && < 2
597-------------------------------------------------------------------------------
598-- Benchmarks
599-------------------------------------------------------------------------------
601-- For linear, linear-async, linear-rate, nested and nested-concurrent
602-- you can pass the number of elements in the stream using the
603-- --stream-size option:
604-- $ cabal run linear -- --stream-size 1000000
606benchmark linear
607 import: bench-options
608 type: exitcode-stdio-1.0
609 hs-source-dirs: benchmark
610 main-is: Linear.hs
611 other-modules: Streamly.Benchmark.Prelude, Common
612 build-depends:
613 streamly
614 , base >= 4.8 && < 5
615 , deepseq >= 1.4.1 && < 1.5
616 , random >= 1.0 && < 2.0
617 , gauge >= 0.2.4 && < 0.3
618 if impl(ghc < 8.0)
619 build-depends:
620 transformers >= 0.4 && < 0.6
621 if flag(inspection)
622 build-depends: template-haskell >= 2.14 && < 2.16
623 , inspection-testing >= 0.4 && < 0.5
625benchmark nested
626 import: bench-options
627 type: exitcode-stdio-1.0
628 hs-source-dirs: benchmark
629 main-is: Nested.hs
630 other-modules: NestedOps, Common
631 build-depends:
632 streamly
633 , base >= 4.8 && < 5
634 , deepseq >= 1.4.1 && < 1.5
635 , random >= 1.0 && < 2.0
636 , gauge >= 0.2.4 && < 0.3
637 if impl(ghc < 8.0)
638 build-depends:
639 transformers >= 0.4 && < 0.6
641benchmark nested-unfold
642 import: bench-options
643 type: exitcode-stdio-1.0
644 hs-source-dirs: benchmark
645 main-is: NestedUnfold.hs
646 other-modules: NestedUnfoldOps, Common
647 build-depends:
648 streamly
649 , base >= 4.8 && < 5
650 , deepseq >= 1.4.1 && < 1.5
651 , random >= 1.0 && < 2.0
652 , gauge >= 0.2.4 && < 0.3
653 if impl(ghc < 8.0)
654 build-depends:
655 transformers >= 0.4 && < 0.6
657benchmark unpinned-array
658 import: bench-options
659 type: exitcode-stdio-1.0
660 hs-source-dirs: benchmark
661 main-is: Streamly/Benchmark/Data/Array.hs
662 other-modules: Streamly.Benchmark.Data.ArrayOps
663 build-depends:
664 streamly
665 , base >= 4.8 && < 5
666 , deepseq >= 1.4.1 && < 1.5
667 , random >= 1.0 && < 2.0
668 , gauge >= 0.2.4 && < 0.3
669 if impl(ghc < 8.0)
670 build-depends:
671 transformers >= 0.4 && < 0.6
673benchmark small-array
674 import: bench-options
675 type: exitcode-stdio-1.0
676 hs-source-dirs: benchmark
677 main-is: Streamly/Benchmark/Data/SmallArray.hs
678 other-modules: Streamly.Benchmark.Data.SmallArrayOps
679 build-depends:
680 streamly
681 , base >= 4.8 && < 5
682 , deepseq >= 1.4.1 && < 1.5
683 , random >= 1.0 && < 2.0
684 , gauge >= 0.2.4 && < 0.3
685 if impl(ghc < 8.0)
686 build-depends:
687 transformers >= 0.4 && < 0.6
689benchmark array
690 import: bench-options
691 type: exitcode-stdio-1.0
692 hs-source-dirs: benchmark
693 main-is: Array.hs
694 other-modules: ArrayOps
695 build-depends:
696 streamly
697 , base >= 4.8 && < 5
698 , deepseq >= 1.4.1 && < 1.5
699 , random >= 1.0 && < 2.0
700 , gauge >= 0.2.4 && < 0.3
701 if impl(ghc < 8.0)
702 build-depends:
703 transformers >= 0.4 && < 0.6
705benchmark fileio
706 import: bench-options
707 type: exitcode-stdio-1.0
708 -- A value of 400 works better for some benchmarks, however, it takes
709 -- extraordinary amount of time to compile with that.
710 -- ghc-options: -funfolding-use-threshold=150
711 hs-source-dirs: benchmark
712 main-is: FileIO.hs
713 other-modules: Streamly.Benchmark.FileIO.Array
714 , Streamly.Benchmark.FileIO.Stream
715 build-depends:
716 streamly
717 , base >= 4.8 && < 5
718 , gauge >= 0.2.4 && < 0.3
719 , typed-process >= 0.2.3 && < 0.3
720 , deepseq >= 1.4.1 && < 1.5
721 if flag(inspection)
722 build-depends: template-haskell >= 2.14 && < 2.16
723 , inspection-testing >= 0.4 && < 0.5
725-------------------------------------------------------------------------------
726-- Threaded Benchmarks
727-------------------------------------------------------------------------------
729benchmark linear-async
730 import: bench-options-threaded
731 type: exitcode-stdio-1.0
732 hs-source-dirs: benchmark
733 main-is: LinearAsync.hs
734 other-modules: Streamly.Benchmark.Prelude, Common
735 build-depends:
736 streamly
737 , base >= 4.8 && < 5
738 , deepseq >= 1.4.1 && < 1.5
739 , random >= 1.0 && < 2.0
740 , gauge >= 0.2.4 && < 0.3
741 if impl(ghc < 8.0)
742 build-depends:
743 transformers >= 0.4 && < 0.6
744 if flag(inspection)
745 build-depends: template-haskell >= 2.14 && < 2.16
746 , inspection-testing >= 0.4 && < 0.5
748benchmark nested-concurrent
749 import: bench-options-threaded
750 type: exitcode-stdio-1.0
751 hs-source-dirs: benchmark
752 main-is: NestedConcurrent.hs
753 other-modules: NestedOps, Common
754 build-depends:
755 streamly
756 , base >= 4.8 && < 5
757 , deepseq >= 1.4.1 && < 1.5
758 , random >= 1.0 && < 2.0
759 , gauge >= 0.2.4 && < 0.3
760 if impl(ghc < 8.0)
761 build-depends:
762 transformers >= 0.4 && < 0.6
764benchmark parallel
765 import: bench-options-threaded
766 type: exitcode-stdio-1.0
767 hs-source-dirs: benchmark
768 main-is: Parallel.hs
769 other-modules: Streamly.Benchmark.Prelude, NestedOps, Common
770 build-depends:
771 streamly
772 , base >= 4.8 && < 5
773 , deepseq >= 1.4.1 && < 1.5
774 , random >= 1.0 && < 2.0
775 , gauge >= 0.2.4 && < 0.3
776 if impl(ghc < 8.0)
777 build-depends:
778 transformers >= 0.4 && < 0.6
779 if flag(inspection)
780 build-depends: template-haskell >= 2.14 && < 2.16
781 , inspection-testing >= 0.4 && < 0.5
783benchmark linear-rate
784 import: bench-options-threaded
785 type: exitcode-stdio-1.0
786 hs-source-dirs: benchmark
787 main-is: LinearRate.hs
788 other-modules: Streamly.Benchmark.Prelude, Common
789 build-depends:
790 streamly
791 , base >= 4.8 && < 5
792 , deepseq >= 1.4.1 && < 1.5
793 , random >= 1.0 && < 2.0
794 , gauge >= 0.2.4 && < 0.3
795 if impl(ghc < 8.0)
796 build-depends:
797 transformers >= 0.4 && < 0.6
798 if flag(inspection)
799 build-depends: template-haskell >= 2.14 && < 2.16
800 , inspection-testing >= 0.4 && < 0.5
802benchmark concurrent
803 import: bench-options-threaded
804 type: exitcode-stdio-1.0
805 hs-source-dirs: benchmark
806 main-is: Concurrent.hs
807 if flag(dev)
808 buildable: True
809 build-depends:
810 streamly
811 , base >= 4.8 && < 5
812 , gauge >= 0.2.4 && < 0.3
813 else
814 buildable: False
816-------------------------------------------------------------------------------
817-- Internal benchmarks
818-------------------------------------------------------------------------------
820benchmark base
821 import: bench-options
822 type: exitcode-stdio-1.0
823 hs-source-dirs: benchmark
824 main-is: BaseStreams.hs
825 other-modules: StreamDOps
826 , StreamKOps
827 , StreamDKOps
829 if flag(dev)
830 buildable: True
831 build-depends:
832 streamly
833 , base >= 4.8 && < 5
834 , deepseq >= 1.4.1 && < 1.5
835 , random >= 1.0 && < 2.0
836 , gauge >= 0.2.4 && < 0.3
837 else
838 buildable: False
840executable nano-bench
841 import: bench-options
842 hs-source-dirs: benchmark
843 main-is: NanoBenchmarks.hs
844 if flag(dev)
845 buildable: True
846 build-depends:
847 streamly
848 , base >= 4.8 && < 5
849 , gauge >= 0.2.4 && < 0.3
850 , random >= 1.0 && < 2.0
851 else
852 buildable: False
854benchmark adaptive
855 import: bench-options
856 type: exitcode-stdio-1.0
857 hs-source-dirs: benchmark
858 main-is: Adaptive.hs
859 default-language: Haskell2010
860 if flag(dev)
861 buildable: True
862 build-depends:
863 streamly
864 , base >= 4.8 && < 5
865 , gauge >= 0.2.4 && < 0.3
866 , random >= 1.0 && < 2.0
867 else
868 buildable: False
870executable chart
871 default-language: Haskell2010
872 ghc-options: -Wall
873 hs-source-dirs: benchmark
874 main-is: Chart.hs
875 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
876 buildable: True
877 build-Depends:
878 base >= 4.8 && < 5
879 , bench-show >= 0.3 && < 0.4
880 , split
881 , transformers >= 0.4 && < 0.6
882 else
883 buildable: False
885-------------------------------------------------------------------------------
886-- Examples
887-------------------------------------------------------------------------------
889executable SearchQuery
890 import: exe-options
891 main-is: SearchQuery.hs
892 hs-source-dirs: examples
893 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
894 buildable: True
895 build-Depends:
896 streamly
897 , base >= 4.8 && < 5
898 , http-conduit >= 2.2.2 && < 2.4
899 else
900 buildable: False
902executable ListDir
903 import: exe-options
904 main-is: ListDir.hs
905 hs-source-dirs: examples
906 if flag(examples) || flag(examples-sdl)
907 buildable: True
908 build-Depends:
909 streamly
910 , base >= 4.8 && < 5
911 , directory >= 1.3 && < 1.4
912 if impl(ghc < 8.0)
913 build-depends:
914 transformers >= 0.4 && < 0.6
915 else
916 buildable: False
918executable MergeSort
919 import: exe-options
920 main-is: MergeSort.hs
921 hs-source-dirs: examples
922 if flag(examples) || flag(examples-sdl)
923 buildable: True
924 build-Depends:
925 streamly
926 , base >= 4.8 && < 5
927 , random >= 1.0.0 && < 2
928 else
929 buildable: False
931executable AcidRain
932 import: exe-options
933 main-is: AcidRain.hs
934 hs-source-dirs: examples
935 if flag(examples) || flag(examples-sdl)
936 buildable: True
937 build-Depends:
938 streamly
939 , base >= 4.8 && < 5
940 , mtl >= 2.2 && < 3
941 if impl(ghc < 8.0)
942 build-depends:
943 semigroups >= 0.18 && < 0.19
944 , transformers >= 0.4 && < 0.6
945 else
946 buildable: False
948executable CirclingSquare
949 import: exe-options
950 main-is: CirclingSquare.hs
951 hs-source-dirs: examples
952 if flag(examples-sdl)
953 buildable: True
954 build-Depends:
955 streamly
956 , base >= 4.8 && < 5
957 , SDL >= 0.6.5 && < 0.7
958 else
959 buildable: False
961executable ControlFlow
962 import: exe-options
963 main-is: ControlFlow.hs
964 hs-source-dirs: examples
965 if flag(examples) || flag(examples-sdl)
966 buildable: True
967 build-Depends:
968 streamly
969 , base >= 4.8 && < 5
970 , exceptions >= 0.8 && < 0.11
971 , transformers >= 0.4 && < 0.6
972 , transformers-base >= 0.4 && < 0.5
973 if impl(ghc < 8.0)
974 build-depends:
975 semigroups >= 0.18 && < 0.19
976 else
977 buildable: False
979executable HandleIO
980 import: exe-options
981 main-is: HandleIO.hs
982 hs-source-dirs: examples
983 if flag(examples) || flag(examples-sdl)
984 buildable: True
985 build-Depends:
986 streamly
987 , base >= 4.8 && < 5
988 else
989 buildable: False
991executable FileIOExamples
992 import: exe-options
993 main-is: FileIOExamples.hs
994 hs-source-dirs: examples
995 if flag(examples) || flag(examples-sdl)
996 buildable: True
997 build-Depends:
998 streamly
999 , base >= 4.8 && < 5
1000 else
1001 buildable: False
1003executable EchoServer
1004 import: exe-options
1005 main-is: EchoServer.hs
1006 hs-source-dirs: examples
1007 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1008 buildable: True
1009 build-Depends:
1010 streamly
1011 , base >= 4.8 && < 5
1012 , network >= 2.6 && < 4
1013 if impl(ghc < 8.0)
1014 build-depends:
1015 transformers >= 0.4 && < 0.6
1016 else
1017 buildable: False
1019executable FileSinkServer
1020 import: exe-options
1021 main-is: FileSinkServer.hs
1022 hs-source-dirs: examples
1023 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1024 buildable: True
1025 build-Depends:
1026 streamly
1027 , base >= 4.8 && < 5
1028 , network >= 2.6 && < 4
1029 if impl(ghc < 8.0)
1030 build-depends:
1031 transformers >= 0.4 && < 0.6
1032 else
1033 buildable: False
1035executable FromFileClient
1036 import: exe-options
1037 main-is: FromFileClient.hs
1038 hs-source-dirs: examples
1039 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1040 buildable: True
1041 build-Depends:
1042 streamly
1043 , base >= 4.8 && < 5
1044 else
1045 buildable: False
1047executable WordClassifier
1048 import: exe-options
1049 main-is: WordClassifier.hs
1050 hs-source-dirs: examples
1051 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1052 buildable: True
1053 build-Depends:
1054 streamly
1055 , base >= 4.8 && < 5
1056 , hashable >= 1.2 && < 1.4
1057 , unordered-containers >= 0.2 && < 0.3
1058 else
1059 buildable: False
1061executable WordCount
1062 import: exe-options
1063 main-is: WordCount.hs
1064 hs-source-dirs: examples
1065 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1066 buildable: True
1067 build-Depends:
1068 streamly
1069 , base >= 4.8 && < 5
1070 , vector >= 0.12 && < 0.13
1071 else
1072 buildable: False
1074executable CamelCase
1075 import: exe-options
1076 main-is: CamelCase.hs
1077 hs-source-dirs: examples
1078 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1079 buildable: True
1080 build-Depends:
1081 streamly
1082 , base >= 4.8 && < 5
1083 else
1084 buildable: False