on 5054813 help sign in
streamly/streamly.cabal
1119 lines 35 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
278 , Streamly.Data.Prim.Array
280 -- Memory storage
281 Streamly.Memory.Malloc
282 , Streamly.Memory.Ring
284 , Streamly.FileSystem.IOVec
285 , Streamly.FileSystem.FDIO
286 , Streamly.FileSystem.FD
288 exposed-modules:
289 Streamly.Prelude
290 , Streamly
291 , Streamly.Data.Fold
292 , Streamly.Data.Unfold
293 , Streamly.Data.Unicode.Stream
295 -- IO devices
296 , Streamly.Memory.Array
297 , Streamly.FileSystem.Handle
299 , Streamly.Tutorial
301 -- Internal modules
302 , Streamly.Internal.Control.Monad
303 , Streamly.Internal.Data.Strict
304 , Streamly.Internal.Data.Atomics
305 , Streamly.Internal.Data.Time
306 , Streamly.Internal.Data.Time.Units
307 , Streamly.Internal.Data.Time.Clock
308 , Streamly.Internal.Data.SVar
309 , Streamly.Internal.Data.Array
310 , Streamly.Internal.Data.Prim.Array
311 , Streamly.Internal.Data.SmallArray
312 , Streamly.Internal.Memory.Array.Types
313 , Streamly.Internal.Memory.Array
314 , Streamly.Internal.Memory.ArrayStream
315 , Streamly.Internal.Data.Fold.Types
316 , Streamly.Internal.Data.Fold
317 , Streamly.Internal.Data.Sink.Types
318 , Streamly.Internal.Data.Sink
320 -- Base streams
321 , Streamly.Internal.Data.Stream.StreamK.Type
322 , Streamly.Internal.Data.Stream.StreamK
323 , Streamly.Internal.Data.Stream.StreamD.Type
324 , Streamly.Internal.Data.Stream.StreamD
325 , Streamly.Internal.Data.Stream.StreamDK.Type
326 , Streamly.Internal.Data.Stream.StreamDK
327 , Streamly.Internal.Data.Stream.Enumeration
328 , Streamly.Internal.Data.Stream.Prelude
330 -- Higher level streams
331 , Streamly.Internal.Data.Stream.SVar
332 , Streamly.Internal.Data.Stream.Serial
333 , Streamly.Internal.Data.Stream.Async
334 , Streamly.Internal.Data.Stream.Parallel
335 , Streamly.Internal.Data.Stream.Ahead
336 , Streamly.Internal.Data.Stream.Zip
337 , Streamly.Internal.Data.Stream.Combinators
338 , Streamly.Internal.Data.Unfold.Types
339 , Streamly.Internal.Data.Unfold
340 , Streamly.Internal.Data.Pipe.Types
341 , Streamly.Internal.Data.Pipe
342 , Streamly.Internal.Data.List
343 , Streamly.Internal.FileSystem.Handle
344 , Streamly.Internal.FileSystem.Dir
345 , Streamly.Internal.FileSystem.File
346 , Streamly.Internal.Data.Unicode.Stream
347 , Streamly.Internal.Data.Unicode.Char
348 , Streamly.Internal.Memory.Unicode.Array
349 , Streamly.Internal.Prelude
351 -- Mutable data
352 , Streamly.Internal.Mutable.Prim.Var
354 if !impl(ghcjs)
355 exposed-modules:
356 Streamly.Network.Socket
357 , Streamly.Network.Inet.TCP
359 , Streamly.Internal.Network.Socket
360 , Streamly.Internal.Network.Inet.TCP
362 build-depends:
363 -- Core libraries shipped with ghc, the min and max
364 -- constraints of these libraries should match with
365 -- the GHC versions we support
366 base >= 4.8 && < 5
367 , containers >= 0.5 && < 0.7
368 , deepseq >= 1.4.1 && < 1.5
369 , directory >= 1.3 && < 1.4
370 , ghc-prim >= 0.2 && < 0.6
371 , transformers >= 0.4 && < 0.6
373 , heaps >= 0.3 && < 0.4
374 , primitive >= 0.6.4.0 && < 0.8
376 -- concurrency
377 , atomic-primops >= 0.8 && < 0.9
378 , lockfree-queue >= 0.2.3 && < 0.3
380 -- transfomers
381 , exceptions >= 0.8 && < 0.11
382 , monad-control >= 1.0 && < 2
383 , mtl >= 2.2 && < 3
384 , transformers-base >= 0.4 && < 0.5
386 if !impl(ghcjs)
387 build-depends:
388 network >= 2.6 && < 4
389 if impl(ghc < 8.0)
390 build-depends:
391 semigroups >= 0.18 && < 0.19
393 -- Array uses a Storable constraint in dev build making several inspection
394 -- tests fail
395 if flag(dev) && flag(inspection)
396 build-depends: inspection-and-dev-flags-cannot-be-used-together
398-------------------------------------------------------------------------------
399-- Test suites
400-------------------------------------------------------------------------------
402test-suite test
403 import: test-options
404 type: exitcode-stdio-1.0
405 main-is: Main.hs
406 js-sources: jsbits/clock.js
407 hs-source-dirs: test
408 build-depends:
409 streamly
410 , base >= 4.8 && < 5
411 , hspec >= 2.0 && < 3
412 , containers >= 0.5 && < 0.7
413 , transformers >= 0.4 && < 0.6
414 , mtl >= 2.2 && < 3
415 , exceptions >= 0.8 && < 0.11
416 default-language: Haskell2010
418test-suite internal-prelude-test
419 import: test-options
420 type: exitcode-stdio-1.0
421 main-is: Streamly/Test/Internal/Prelude.hs
422 js-sources: jsbits/clock.js
423 hs-source-dirs: test
424 build-depends:
425 streamly
426 , base >= 4.8 && < 5
427 , QuickCheck >= 2.10 && < 2.14
428 , hspec >= 2.0 && < 3
429 default-language: Haskell2010
431test-suite pure-streams-base
432 import: test-options
433 type: exitcode-stdio-1.0
434 main-is: PureStreams.hs
435 hs-source-dirs: test
436 build-depends:
437 streamly
438 , base >= 4.8 && < 5
439 , hspec >= 2.0 && < 3
440 default-language: Haskell2010
442test-suite pure-streams-streamly
443 import: test-options
444 type: exitcode-stdio-1.0
445 main-is: PureStreams.hs
446 hs-source-dirs: test
447 cpp-options: -DUSE_STREAMLY_LIST
448 build-depends:
449 streamly
450 , base >= 4.8 && < 5
451 , hspec >= 2.0 && < 3
452 default-language: Haskell2010
454test-suite properties
455 import: test-options
456 type: exitcode-stdio-1.0
457 main-is: Prop.hs
458 js-sources: jsbits/clock.js
459 hs-source-dirs: test
460 build-depends:
461 streamly
462 , base >= 4.8 && < 5
463 , QuickCheck >= 2.10 && < 2.14
464 , hspec >= 2.0 && < 3
465 if impl(ghc < 8.0)
466 build-depends:
467 transformers >= 0.4 && < 0.6
468 default-language: Haskell2010
470test-suite array-test
471 import: test-options
472 type: exitcode-stdio-1.0
473 main-is: Streamly/Test/Array.hs
474 js-sources: jsbits/clock.js
475 hs-source-dirs: test
476 cpp-options: -DTEST_ARRAY
477 build-depends:
478 streamly
479 , base >= 4.8 && < 5
480 , QuickCheck >= 2.10 && < 2.14
481 , hspec >= 2.0 && < 3
482 if impl(ghc < 8.0)
483 build-depends:
484 transformers >= 0.4 && < 0.6
485 default-language: Haskell2010
487test-suite internal-data-fold-test
488 import: test-options
489 type: exitcode-stdio-1.0
490 main-is: Streamly/Test/Internal/Data/Fold.hs
491 js-sources: jsbits/clock.js
492 hs-source-dirs: test
493 build-depends:
494 streamly
495 , base >= 4.8 && < 5
496 , hspec >= 2.0 && < 3
497 , QuickCheck >= 2.10 && < 2.14
498 default-language: Haskell2010
500test-suite data-array-test
501 import: test-options
502 type: exitcode-stdio-1.0
503 main-is: Streamly/Test/Array.hs
504 js-sources: jsbits/clock.js
505 hs-source-dirs: test
506 build-depends:
507 streamly
508 , base >= 4.8 && < 5
509 , QuickCheck >= 2.10 && < 2.14
510 , hspec >= 2.0 && < 3
511 if impl(ghc < 8.0)
512 build-depends:
513 transformers >= 0.4 && < 0.6
514 default-language: Haskell2010
516test-suite smallarray-test
517 import: test-options
518 type: exitcode-stdio-1.0
519 main-is: Streamly/Test/Array.hs
520 js-sources: jsbits/clock.js
521 hs-source-dirs: test
522 cpp-options: -DTEST_SMALL_ARRAY
523 build-depends:
524 streamly
525 , base >= 4.8 && < 5
526 , QuickCheck >= 2.10 && < 2.14
527 , hspec >= 2.0 && < 3
528 if impl(ghc < 8.0)
529 build-depends:
530 transformers >= 0.4 && < 0.6
531 default-language: Haskell2010
533test-suite primarray-test
534 import: test-options
535 type: exitcode-stdio-1.0
536 main-is: Streamly/Test/Array.hs
537 js-sources: jsbits/clock.js
538 hs-source-dirs: test
539 cpp-options: -DTEST_PRIM_ARRAY
540 build-depends:
541 streamly
542 , base >= 4.8 && < 5
543 , QuickCheck >= 2.10 && < 2.14
544 , hspec >= 2.0 && < 3
545 if impl(ghc < 8.0)
546 build-depends:
547 transformers >= 0.4 && < 0.6
548 default-language: Haskell2010
550test-suite string-test
551 import: test-options
552 type: exitcode-stdio-1.0
553 main-is: String.hs
554 js-sources: jsbits/clock.js
555 hs-source-dirs: test
556 build-depends:
557 streamly
558 , base >= 4.8 && < 5
559 , QuickCheck >= 2.10 && < 2.14
560 , hspec >= 2.0 && < 3
561 if impl(ghc < 8.0)
562 build-depends:
563 transformers >= 0.4 && < 0.6
564 default-language: Haskell2010
566test-suite maxrate
567 import: exe-options
568 type: exitcode-stdio-1.0
569 default-language: Haskell2010
570 main-is: MaxRate.hs
571 js-sources: jsbits/clock.js
572 hs-source-dirs: test
573 if flag(dev)
574 buildable: True
575 build-Depends:
576 streamly
577 , base >= 4.8 && < 5
578 , clock >= 0.7.1 && < 0.9
579 , hspec >= 2.0 && < 3
580 , random >= 1.0.0 && < 2
581 else
582 buildable: False
584test-suite loops
585 import: test-options
586 type: exitcode-stdio-1.0
587 default-language: Haskell2010
588 main-is: loops.hs
589 hs-source-dirs: test
590 build-Depends:
591 streamly
592 , base >= 4.8 && < 5
594test-suite nested-loops
595 import: test-options
596 type: exitcode-stdio-1.0
597 default-language: Haskell2010
598 main-is: nested-loops.hs
599 hs-source-dirs: test
600 build-Depends:
601 streamly
602 , base >= 4.8 && < 5
603 , random >= 1.0.0 && < 2
605test-suite parallel-loops
606 import: test-options
607 type: exitcode-stdio-1.0
608 default-language: Haskell2010
609 main-is: parallel-loops.hs
610 hs-source-dirs: test
611 build-Depends:
612 streamly
613 , base >= 4.8 && < 5
614 , random >= 1.0.0 && < 2
616-------------------------------------------------------------------------------
617-- Benchmarks
618-------------------------------------------------------------------------------
620-- For linear, linear-async, linear-rate, nested and nested-concurrent
621-- you can pass the number of elements in the stream using the
622-- --stream-size option:
623-- $ cabal run linear -- --stream-size 1000000
625benchmark linear
626 import: bench-options
627 type: exitcode-stdio-1.0
628 hs-source-dirs: benchmark
629 main-is: Linear.hs
630 other-modules: Streamly.Benchmark.Prelude, 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
640 if flag(inspection)
641 build-depends: template-haskell >= 2.14 && < 2.16
642 , inspection-testing >= 0.4 && < 0.5
644benchmark nested
645 import: bench-options
646 type: exitcode-stdio-1.0
647 hs-source-dirs: benchmark
648 main-is: Nested.hs
649 other-modules: NestedOps, Common
650 build-depends:
651 streamly
652 , base >= 4.8 && < 5
653 , deepseq >= 1.4.1 && < 1.5
654 , random >= 1.0 && < 2.0
655 , gauge >= 0.2.4 && < 0.3
656 if impl(ghc < 8.0)
657 build-depends:
658 transformers >= 0.4 && < 0.6
660benchmark nested-unfold
661 import: bench-options
662 type: exitcode-stdio-1.0
663 hs-source-dirs: benchmark
664 main-is: NestedUnfold.hs
665 other-modules: NestedUnfoldOps, Common
666 build-depends:
667 streamly
668 , base >= 4.8 && < 5
669 , deepseq >= 1.4.1 && < 1.5
670 , random >= 1.0 && < 2.0
671 , gauge >= 0.2.4 && < 0.3
672 if impl(ghc < 8.0)
673 build-depends:
674 transformers >= 0.4 && < 0.6
676benchmark unpinned-array
677 import: bench-options
678 type: exitcode-stdio-1.0
679 hs-source-dirs: benchmark
680 main-is: Streamly/Benchmark/Data/Array.hs
681 other-modules: Streamly.Benchmark.Data.ArrayOps
682 build-depends:
683 streamly
684 , base >= 4.8 && < 5
685 , deepseq >= 1.4.1 && < 1.5
686 , random >= 1.0 && < 2.0
687 , gauge >= 0.2.4 && < 0.3
688 if impl(ghc < 8.0)
689 build-depends:
690 transformers >= 0.4 && < 0.6
692benchmark prim-array
693 import: bench-options
694 type: exitcode-stdio-1.0
695 hs-source-dirs: benchmark
696 main-is: Streamly/Benchmark/Data/Prim/Array.hs
697 other-modules: Streamly.Benchmark.Data.Prim.ArrayOps
698 build-depends:
699 streamly
700 , base >= 4.8 && < 5
701 , deepseq >= 1.4.1 && < 1.5
702 , random >= 1.0 && < 2.0
703 , gauge >= 0.2.4 && < 0.3
704 if impl(ghc < 8.0)
705 build-depends:
706 transformers >= 0.4 && < 0.6
708benchmark small-array
709 import: bench-options
710 type: exitcode-stdio-1.0
711 hs-source-dirs: benchmark
712 main-is: Streamly/Benchmark/Data/SmallArray.hs
713 other-modules: Streamly.Benchmark.Data.SmallArrayOps
714 build-depends:
715 streamly
716 , base >= 4.8 && < 5
717 , deepseq >= 1.4.1 && < 1.5
718 , random >= 1.0 && < 2.0
719 , gauge >= 0.2.4 && < 0.3
720 if impl(ghc < 8.0)
721 build-depends:
722 transformers >= 0.4 && < 0.6
724benchmark array
725 import: bench-options
726 type: exitcode-stdio-1.0
727 hs-source-dirs: benchmark
728 main-is: Array.hs
729 other-modules: ArrayOps
730 build-depends:
731 streamly
732 , base >= 4.8 && < 5
733 , deepseq >= 1.4.1 && < 1.5
734 , random >= 1.0 && < 2.0
735 , gauge >= 0.2.4 && < 0.3
736 if impl(ghc < 8.0)
737 build-depends:
738 transformers >= 0.4 && < 0.6
740benchmark fileio
741 import: bench-options
742 type: exitcode-stdio-1.0
743 -- A value of 400 works better for some benchmarks, however, it takes
744 -- extraordinary amount of time to compile with that.
745 -- ghc-options: -funfolding-use-threshold=150
746 hs-source-dirs: benchmark
747 main-is: FileIO.hs
748 other-modules: Streamly.Benchmark.FileIO.Array
749 , Streamly.Benchmark.FileIO.Stream
750 build-depends:
751 streamly
752 , base >= 4.8 && < 5
753 , gauge >= 0.2.4 && < 0.3
754 , typed-process >= 0.2.3 && < 0.3
755 , deepseq >= 1.4.1 && < 1.5
756 if flag(inspection)
757 build-depends: template-haskell >= 2.14 && < 2.16
758 , inspection-testing >= 0.4 && < 0.5
760-------------------------------------------------------------------------------
761-- Threaded Benchmarks
762-------------------------------------------------------------------------------
764benchmark linear-async
765 import: bench-options-threaded
766 type: exitcode-stdio-1.0
767 hs-source-dirs: benchmark
768 main-is: LinearAsync.hs
769 other-modules: Streamly.Benchmark.Prelude, 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 nested-concurrent
784 import: bench-options-threaded
785 type: exitcode-stdio-1.0
786 hs-source-dirs: benchmark
787 main-is: NestedConcurrent.hs
788 other-modules: NestedOps, 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
799benchmark parallel
800 import: bench-options-threaded
801 type: exitcode-stdio-1.0
802 hs-source-dirs: benchmark
803 main-is: Parallel.hs
804 other-modules: Streamly.Benchmark.Prelude, NestedOps, Common
805 build-depends:
806 streamly
807 , base >= 4.8 && < 5
808 , deepseq >= 1.4.1 && < 1.5
809 , random >= 1.0 && < 2.0
810 , gauge >= 0.2.4 && < 0.3
811 if impl(ghc < 8.0)
812 build-depends:
813 transformers >= 0.4 && < 0.6
814 if flag(inspection)
815 build-depends: template-haskell >= 2.14 && < 2.16
816 , inspection-testing >= 0.4 && < 0.5
818benchmark linear-rate
819 import: bench-options-threaded
820 type: exitcode-stdio-1.0
821 hs-source-dirs: benchmark
822 main-is: LinearRate.hs
823 other-modules: Streamly.Benchmark.Prelude, Common
824 build-depends:
825 streamly
826 , base >= 4.8 && < 5
827 , deepseq >= 1.4.1 && < 1.5
828 , random >= 1.0 && < 2.0
829 , gauge >= 0.2.4 && < 0.3
830 if impl(ghc < 8.0)
831 build-depends:
832 transformers >= 0.4 && < 0.6
833 if flag(inspection)
834 build-depends: template-haskell >= 2.14 && < 2.16
835 , inspection-testing >= 0.4 && < 0.5
837benchmark concurrent
838 import: bench-options-threaded
839 type: exitcode-stdio-1.0
840 hs-source-dirs: benchmark
841 main-is: Concurrent.hs
842 if flag(dev)
843 buildable: True
844 build-depends:
845 streamly
846 , base >= 4.8 && < 5
847 , gauge >= 0.2.4 && < 0.3
848 else
849 buildable: False
851-------------------------------------------------------------------------------
852-- Internal benchmarks
853-------------------------------------------------------------------------------
855benchmark base
856 import: bench-options
857 type: exitcode-stdio-1.0
858 hs-source-dirs: benchmark
859 main-is: BaseStreams.hs
860 other-modules: StreamDOps
861 , StreamKOps
862 , StreamDKOps
864 if flag(dev)
865 buildable: True
866 build-depends:
867 streamly
868 , base >= 4.8 && < 5
869 , deepseq >= 1.4.1 && < 1.5
870 , random >= 1.0 && < 2.0
871 , gauge >= 0.2.4 && < 0.3
872 else
873 buildable: False
875executable nano-bench
876 import: bench-options
877 hs-source-dirs: benchmark
878 main-is: NanoBenchmarks.hs
879 if flag(dev)
880 buildable: True
881 build-depends:
882 streamly
883 , base >= 4.8 && < 5
884 , gauge >= 0.2.4 && < 0.3
885 , random >= 1.0 && < 2.0
886 else
887 buildable: False
889benchmark adaptive
890 import: bench-options
891 type: exitcode-stdio-1.0
892 hs-source-dirs: benchmark
893 main-is: Adaptive.hs
894 default-language: Haskell2010
895 if flag(dev)
896 buildable: True
897 build-depends:
898 streamly
899 , base >= 4.8 && < 5
900 , gauge >= 0.2.4 && < 0.3
901 , random >= 1.0 && < 2.0
902 else
903 buildable: False
905executable chart
906 default-language: Haskell2010
907 ghc-options: -Wall
908 hs-source-dirs: benchmark
909 main-is: Chart.hs
910 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
911 buildable: True
912 build-Depends:
913 base >= 4.8 && < 5
914 , bench-show >= 0.3 && < 0.4
915 , split
916 , transformers >= 0.4 && < 0.6
917 else
918 buildable: False
920-------------------------------------------------------------------------------
921-- Examples
922-------------------------------------------------------------------------------
924executable SearchQuery
925 import: exe-options
926 main-is: SearchQuery.hs
927 hs-source-dirs: examples
928 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
929 buildable: True
930 build-Depends:
931 streamly
932 , base >= 4.8 && < 5
933 , http-conduit >= 2.2.2 && < 2.4
934 else
935 buildable: False
937executable ListDir
938 import: exe-options
939 main-is: ListDir.hs
940 hs-source-dirs: examples
941 if flag(examples) || flag(examples-sdl)
942 buildable: True
943 build-Depends:
944 streamly
945 , base >= 4.8 && < 5
946 , directory >= 1.3 && < 1.4
947 if impl(ghc < 8.0)
948 build-depends:
949 transformers >= 0.4 && < 0.6
950 else
951 buildable: False
953executable MergeSort
954 import: exe-options
955 main-is: MergeSort.hs
956 hs-source-dirs: examples
957 if flag(examples) || flag(examples-sdl)
958 buildable: True
959 build-Depends:
960 streamly
961 , base >= 4.8 && < 5
962 , random >= 1.0.0 && < 2
963 else
964 buildable: False
966executable AcidRain
967 import: exe-options
968 main-is: AcidRain.hs
969 hs-source-dirs: examples
970 if flag(examples) || flag(examples-sdl)
971 buildable: True
972 build-Depends:
973 streamly
974 , base >= 4.8 && < 5
975 , mtl >= 2.2 && < 3
976 if impl(ghc < 8.0)
977 build-depends:
978 semigroups >= 0.18 && < 0.19
979 , transformers >= 0.4 && < 0.6
980 else
981 buildable: False
983executable CirclingSquare
984 import: exe-options
985 main-is: CirclingSquare.hs
986 hs-source-dirs: examples
987 if flag(examples-sdl)
988 buildable: True
989 build-Depends:
990 streamly
991 , base >= 4.8 && < 5
992 , SDL >= 0.6.5 && < 0.7
993 else
994 buildable: False
996executable ControlFlow
997 import: exe-options
998 main-is: ControlFlow.hs
999 hs-source-dirs: examples
1000 if flag(examples) || flag(examples-sdl)
1001 buildable: True
1002 build-Depends:
1003 streamly
1004 , base >= 4.8 && < 5
1005 , exceptions >= 0.8 && < 0.11
1006 , transformers >= 0.4 && < 0.6
1007 , transformers-base >= 0.4 && < 0.5
1008 if impl(ghc < 8.0)
1009 build-depends:
1010 semigroups >= 0.18 && < 0.19
1011 else
1012 buildable: False
1014executable HandleIO
1015 import: exe-options
1016 main-is: HandleIO.hs
1017 hs-source-dirs: examples
1018 if flag(examples) || flag(examples-sdl)
1019 buildable: True
1020 build-Depends:
1021 streamly
1022 , base >= 4.8 && < 5
1023 else
1024 buildable: False
1026executable FileIOExamples
1027 import: exe-options
1028 main-is: FileIOExamples.hs
1029 hs-source-dirs: examples
1030 if flag(examples) || flag(examples-sdl)
1031 buildable: True
1032 build-Depends:
1033 streamly
1034 , base >= 4.8 && < 5
1035 else
1036 buildable: False
1038executable EchoServer
1039 import: exe-options
1040 main-is: EchoServer.hs
1041 hs-source-dirs: examples
1042 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1043 buildable: True
1044 build-Depends:
1045 streamly
1046 , base >= 4.8 && < 5
1047 , network >= 2.6 && < 4
1048 if impl(ghc < 8.0)
1049 build-depends:
1050 transformers >= 0.4 && < 0.6
1051 else
1052 buildable: False
1054executable FileSinkServer
1055 import: exe-options
1056 main-is: FileSinkServer.hs
1057 hs-source-dirs: examples
1058 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1059 buildable: True
1060 build-Depends:
1061 streamly
1062 , base >= 4.8 && < 5
1063 , network >= 2.6 && < 4
1064 if impl(ghc < 8.0)
1065 build-depends:
1066 transformers >= 0.4 && < 0.6
1067 else
1068 buildable: False
1070executable FromFileClient
1071 import: exe-options
1072 main-is: FromFileClient.hs
1073 hs-source-dirs: examples
1074 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1075 buildable: True
1076 build-Depends:
1077 streamly
1078 , base >= 4.8 && < 5
1079 else
1080 buildable: False
1082executable WordClassifier
1083 import: exe-options
1084 main-is: WordClassifier.hs
1085 hs-source-dirs: examples
1086 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1087 buildable: True
1088 build-Depends:
1089 streamly
1090 , base >= 4.8 && < 5
1091 , hashable >= 1.2 && < 1.4
1092 , unordered-containers >= 0.2 && < 0.3
1093 else
1094 buildable: False
1096executable WordCount
1097 import: exe-options
1098 main-is: WordCount.hs
1099 hs-source-dirs: examples
1100 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1101 buildable: True
1102 build-Depends:
1103 streamly
1104 , base >= 4.8 && < 5
1105 , vector >= 0.12 && < 0.13
1106 else
1107 buildable: False
1109executable CamelCase
1110 import: exe-options
1111 main-is: CamelCase.hs
1112 hs-source-dirs: examples
1113 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1114 buildable: True
1115 build-Depends:
1116 streamly
1117 , base >= 4.8 && < 5
1118 else
1119 buildable: False