on 8b92299 help sign in
streamly/streamly.cabal
1038 lines 33 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/: <src/README.md 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 .
78 For additional unreleased/experimental APIs, build the haddock docs using:
79 .
80 > $ cabal haddock --haddock-option="--show-all"
81 > $ stack haddock --haddock-arguments "--show-all" --no-haddock-deps
84homepage: https://github.com/composewell/streamly
85bug-reports: https://github.com/composewell/streamly/issues
86license: BSD-3-Clause
87license-file: LICENSE
88tested-with: GHC==7.10.3
89 , GHC==8.0.2
90 , GHC==8.4.4
91 , GHC==8.6.5
92 , GHC==8.8.1
93author: Harendra Kumar
94maintainer: streamly@composewell.com
95copyright: 2017 Harendra Kumar
96category: Control, Concurrency, Streaming, Reactivity
97stability: Experimental
98build-type: Configure
100extra-source-files:
101 Changelog.md
102 credits/*.md
103 credits/base-4.12.0.0.txt
104 credits/bjoern-2008-2009.txt
105 credits/clock-0.7.2.txt
106 credits/foldl-1.4.5.txt
107 credits/pipes-concurrency-2.0.8.txt
108 credits/pipes-concurrency.txt
109 credits/transient-0.5.5.txt
110 credits/vector-0.12.0.2.txt
111 credits/Yampa-0.10.6.2.txt
112 README.md
113 docs/streamly-vs-async.md
114 docs/streamly-vs-lists.md
115 docs/transformers.md
116 docs/Build.md
117 design/*.md
118 design/*.png
119 bench.sh
120 stack.yaml
121 src/Streamly/Internal/Data/Stream/Instances.hs
122 src/Streamly/Internal/Data/Stream/inline.hs
123 configure.ac
124 configure
125 src/Streamly/Internal/Data/Time/config.h.in
127extra-tmp-files:
128 config.log
129 config.status
130 autom4te.cache
131 src/Streamly/Internal/Data/Time/config.h
133source-repository head
134 type: git
135 location: https://github.com/composewell/streamly
137flag benchmark
138 description: Benchmark build
139 manual: True
140 default: False
142flag inspection
143 description: Enable inspection testing
144 manual: True
145 default: False
147flag debug
148 description: Debug build with asserts enabled
149 manual: True
150 default: False
152flag dev
153 description: Development build
154 manual: True
155 default: False
157flag has-llvm
158 description: Use llvm backend for better performance
159 manual: True
160 default: False
162flag no-charts
163 description: Disable chart generation
164 manual: True
165 default: False
167flag no-fusion
168 description: Disable rewrite rules
169 manual: True
170 default: False
172flag streamk
173 description: Use CPS style streams when possible
174 manual: True
175 default: False
177flag examples
178 description: Build including examples
179 manual: True
180 default: False
182flag examples-sdl
183 description: Build including SDL examples
184 manual: True
185 default: False
187-------------------------------------------------------------------------------
188-- Common stanzas
189-------------------------------------------------------------------------------
191common compile-options
192 default-language: Haskell2010
193 if flag(streamk)
194 cpp-options: -DUSE_STREAMK_ONLY
196 if flag(no-fusion)
197 cpp-options: -DDISABLE_FUSION
199 if flag(dev)
200 cpp-options: -DDEVBUILD
202 if flag(inspection)
203 cpp-options: -DINSPECTION
205 ghc-options: -Wall
207 if flag(has-llvm)
208 ghc-options: -fllvm
210 if flag(dev)
211 ghc-options: -Wmissed-specialisations
212 -Wall-missed-specialisations
214 if flag(dev) || flag(debug)
215 ghc-options: -fno-ignore-asserts
217 if impl(ghc >= 8.0)
218 ghc-options: -Wcompat
219 -Wunrecognised-warning-flags
220 -Widentities
221 -Wincomplete-record-updates
222 -Wincomplete-uni-patterns
223 -Wredundant-constraints
224 -Wnoncanonical-monad-instances
226common optimization-options
227 ghc-options: -O2
228 -fspec-constr-recursive=16
229 -fmax-worker-args=16
231common threading-options
232 ghc-options: -threaded
233 -with-rtsopts=-N
235-- We need optimization options here to optimize internal (non-inlined)
236-- versions of functions. Also, we have some benchmarking inspection tests
237-- part of the library when built with --benchmarks flag. Thos tests fail
238-- if we do not use optimization options here. It was observed that due to
239-- -O2 here some concurrent/nested benchmarks improved and others regressed.
240-- We can investigate a bit more here why the regression occurred.
241common lib-options
242 import: compile-options, optimization-options
244-- Compilation for coverage builds on CI machines takes too long without -O0
245-- XXX we should use coverage flag for that, -O0 may take too long to run tests
246-- in general.
247common test-options
248 import: compile-options, threading-options
249 ghc-options: -O0
250 -fno-ignore-asserts
252-- Used by maxrate test, benchmarks and executables
253common exe-options
254 import: compile-options, optimization-options, threading-options
256-- Some benchmarks are threaded some are not
257common bench-options
258 import: compile-options, optimization-options
259 ghc-options: -with-rtsopts "-T"
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/Streamly/Streams
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 -- Memory storage
277 Streamly.Memory.Malloc
278 , Streamly.Memory.Ring
280 -- Base streams
281 , Streamly.Internal.Data.Stream.StreamK.Type
282 , Streamly.Internal.Data.Stream.StreamK
283 , Streamly.Internal.Data.Stream.StreamDK.Type
284 , Streamly.Internal.Data.Stream.StreamDK
285 , Streamly.Internal.Data.Stream.StreamD
286 , Streamly.Internal.Data.Stream.Enumeration
287 , Streamly.Internal.Data.Stream.Prelude
289 -- Higher level streams
290 , Streamly.Internal.Data.Stream.SVar
291 , Streamly.Internal.Data.Stream.Serial
292 , Streamly.Internal.Data.Stream.Async
293 , Streamly.Internal.Data.Stream.Parallel
294 , Streamly.Internal.Data.Stream.Ahead
295 , Streamly.Internal.Data.Stream.Zip
296 , Streamly.Internal.Data.Stream.Combinators
298 , Streamly.FileSystem.IOVec
299 , Streamly.FileSystem.FDIO
300 , Streamly.FileSystem.FD
302 exposed-modules: Streamly.Prelude
303 , Streamly
304 , Streamly.Data.Array
305 , Streamly.Data.Fold
306 , Streamly.Data.Unfold
307 , Streamly.Data.Unicode.Stream
309 -- IO devices
310 , Streamly.Memory.Array
311 , Streamly.FileSystem.Handle
313 , Streamly.Tutorial
315 -- Internal modules
316 , Streamly.Internal.Control.Monad
317 , Streamly.Internal.Data.Strict
318 , Streamly.Internal.Data.Atomics
319 , Streamly.Internal.Data.Time
320 , Streamly.Internal.Data.Time.Units
321 , Streamly.Internal.Data.Time.Clock
322 , Streamly.Internal.Data.Stream.StreamD.Type
323 , Streamly.Internal.Data.SVar
324 , Streamly.Internal.Data.Array
325 , Streamly.Internal.Memory.Array.Types
326 , Streamly.Internal.Memory.Array
327 , Streamly.Internal.Memory.ArrayStream
328 , Streamly.Internal.Data.Fold.Types
329 , Streamly.Internal.Data.Fold
330 , Streamly.Internal.Data.Sink.Types
331 , Streamly.Internal.Data.Sink
332 , Streamly.Internal.Data.Unfold.Types
333 , Streamly.Internal.Data.Unfold
334 , Streamly.Internal.Data.Pipe.Types
335 , Streamly.Internal.Data.Pipe
336 , Streamly.Internal.Data.List
337 , Streamly.Internal.FileSystem.Handle
338 , Streamly.Internal.FileSystem.Dir
339 , Streamly.Internal.FileSystem.File
340 , Streamly.Internal.Data.Unicode.Stream
341 , Streamly.Internal.Data.Unicode.Char
342 , Streamly.Internal.Memory.Unicode.Array
343 , Streamly.Internal.Prelude
344 if !impl(ghcjs)
345 exposed-modules:
346 Streamly.Network.Socket
347 , Streamly.Network.Inet.TCP
349 , Streamly.Internal.Network.Socket
350 , Streamly.Internal.Network.Inet.TCP
352 if flag(benchmark)
353 exposed-modules:
354 Streamly.Internal.Benchmark.FileIO.Array
355 , Streamly.Internal.Benchmark.FileIO.Stream
356 , Streamly.Internal.Benchmark.Prelude
358 build-depends: base >= 4.8 && < 5
359 , ghc-prim >= 0.2 && < 0.6
360 , deepseq >= 1.4.1 && < 1.5
361 , containers >= 0.5.8.2 && < 0.7
362 , heaps >= 0.3 && < 0.4
363 , directory >= 1.3 && < 1.4
364 , primitive >= 0.6.4.0 && < 0.8
366 -- concurrency
367 , atomic-primops >= 0.8 && < 0.9
368 , lockfree-queue >= 0.2.3 && < 0.3
370 -- transfomers
371 , exceptions >= 0.8 && < 0.11
372 , monad-control >= 1.0 && < 2
373 , mtl >= 2.2 && < 3
374 , transformers >= 0.4 && < 0.6
375 , transformers-base >= 0.4 && < 0.5
377 if flag(inspection)
378 build-depends: template-haskell >= 2.14 && < 2.16
379 , inspection-testing >= 0.4 && < 0.5
381 if !impl(ghcjs)
382 build-depends:
383 network >= 2.6 && < 4
384 if impl(ghc < 8.0)
385 build-depends:
386 semigroups >= 0.18 && < 0.19
388-------------------------------------------------------------------------------
389-- Test suites
390-------------------------------------------------------------------------------
392test-suite test
393 import: test-options
394 type: exitcode-stdio-1.0
395 main-is: Main.hs
396 js-sources: jsbits/clock.js
397 hs-source-dirs: test
398 build-depends:
399 streamly
400 , base >= 4.8 && < 5
401 , hspec >= 2.0 && < 3
402 , containers >= 0.5.8.2 && < 0.7
403 , transformers >= 0.4 && < 0.6
404 , mtl >= 2.2 && < 3
405 , exceptions >= 0.8 && < 0.11
406 default-language: Haskell2010
408test-suite pure-streams-base
409 import: test-options
410 type: exitcode-stdio-1.0
411 main-is: PureStreams.hs
412 hs-source-dirs: test
413 build-depends:
414 streamly
415 , base >= 4.8 && < 5
416 , hspec >= 2.0 && < 3
417 default-language: Haskell2010
419test-suite pure-streams-streamly
420 import: test-options
421 type: exitcode-stdio-1.0
422 main-is: PureStreams.hs
423 hs-source-dirs: test
424 cpp-options: -DUSE_STREAMLY_LIST
425 build-depends:
426 streamly
427 , base >= 4.8 && < 5
428 , hspec >= 2.0 && < 3
429 default-language: Haskell2010
431test-suite properties
432 import: test-options
433 type: exitcode-stdio-1.0
434 main-is: Prop.hs
435 js-sources: jsbits/clock.js
436 hs-source-dirs: test
437 build-depends:
438 streamly
439 , base >= 4.8 && < 5
440 , QuickCheck >= 2.10 && < 2.14
441 , hspec >= 2.0 && < 3
442 if impl(ghc < 8.0)
443 build-depends:
444 transformers >= 0.4 && < 0.6
445 default-language: Haskell2010
447test-suite array-test
448 import: test-options
449 type: exitcode-stdio-1.0
450 main-is: Arrays.hs
451 js-sources: jsbits/clock.js
452 hs-source-dirs: test
453 build-depends:
454 streamly
455 , base >= 4.8 && < 5
456 , QuickCheck >= 2.10 && < 2.14
457 , hspec >= 2.0 && < 3
458 if impl(ghc < 8.0)
459 build-depends:
460 transformers >= 0.4 && < 0.6
461 default-language: Haskell2010
463test-suite unpinned-array-test
464 import: test-options
465 type: exitcode-stdio-1.0
466 main-is: Streamly/Test/Data/Array.hs
467 js-sources: jsbits/clock.js
468 hs-source-dirs: test
469 build-depends:
470 streamly
471 , base >= 4.8 && < 5
472 , QuickCheck >= 2.10 && < 2.14
473 , hspec >= 2.0 && < 3
474 if impl(ghc < 8.0)
475 build-depends:
476 transformers >= 0.4 && < 0.6
477 default-language: Haskell2010
479test-suite string-test
480 import: test-options
481 type: exitcode-stdio-1.0
482 main-is: String.hs
483 js-sources: jsbits/clock.js
484 hs-source-dirs: test
485 build-depends:
486 streamly
487 , base >= 4.8 && < 5
488 , QuickCheck >= 2.10 && < 2.14
489 , hspec >= 2.0 && < 3
490 if impl(ghc < 8.0)
491 build-depends:
492 transformers >= 0.4 && < 0.6
493 default-language: Haskell2010
495test-suite maxrate
496 import: exe-options
497 type: exitcode-stdio-1.0
498 default-language: Haskell2010
499 main-is: MaxRate.hs
500 js-sources: jsbits/clock.js
501 hs-source-dirs: test
502 if flag(dev)
503 buildable: True
504 build-Depends:
505 streamly
506 , base >= 4.8 && < 5
507 , clock >= 0.7.1 && < 0.9
508 , hspec >= 2.0 && < 3
509 , random >= 1.0.0 && < 2
510 else
511 buildable: False
513test-suite loops
514 import: test-options
515 type: exitcode-stdio-1.0
516 default-language: Haskell2010
517 main-is: loops.hs
518 hs-source-dirs: test
519 build-Depends:
520 streamly
521 , base >= 4.8 && < 5
523test-suite nested-loops
524 import: test-options
525 type: exitcode-stdio-1.0
526 default-language: Haskell2010
527 main-is: nested-loops.hs
528 hs-source-dirs: test
529 build-Depends:
530 streamly
531 , base >= 4.8 && < 5
532 , random >= 1.0.0 && < 2
534test-suite parallel-loops
535 import: test-options
536 type: exitcode-stdio-1.0
537 default-language: Haskell2010
538 main-is: parallel-loops.hs
539 hs-source-dirs: test
540 build-Depends:
541 streamly
542 , base >= 4.8 && < 5
543 , random >= 1.0.0 && < 2
545-------------------------------------------------------------------------------
546-- Benchmarks
547-------------------------------------------------------------------------------
549benchmark linear
550 import: bench-options
551 type: exitcode-stdio-1.0
552 hs-source-dirs: benchmark
553 main-is: Linear.hs
554 if flag(benchmark)
555 buildable: True
556 build-depends:
557 streamly
558 , base >= 4.8 && < 5
559 , deepseq >= 1.4.1 && < 1.5
560 , random >= 1.0 && < 2.0
561 , gauge >= 0.2.4 && < 0.3
562 if impl(ghc < 8.0)
563 build-depends:
564 transformers >= 0.4 && < 0.6
565 else
566 buildable: False
568benchmark linear-async
569 import: bench-options
570 cpp-options: -DLINEAR_ASYNC
571 type: exitcode-stdio-1.0
572 hs-source-dirs: benchmark
573 main-is: LinearAsync.hs
574 if flag(benchmark)
575 buildable: True
576 build-depends:
577 streamly
578 , base >= 4.8 && < 5
579 , deepseq >= 1.4.1 && < 1.5
580 , random >= 1.0 && < 2.0
581 , gauge >= 0.2.4 && < 0.3
582 if impl(ghc < 8.0)
583 build-depends:
584 transformers >= 0.4 && < 0.6
585 else
586 buildable: False
588benchmark linear-rate
589 import: bench-options
590 type: exitcode-stdio-1.0
591 hs-source-dirs: benchmark
592 main-is: LinearRate.hs
593 if flag(benchmark)
594 buildable: True
595 build-depends:
596 streamly
597 , base >= 4.8 && < 5
598 , deepseq >= 1.4.1 && < 1.5
599 , random >= 1.0 && < 2.0
600 , gauge >= 0.2.4 && < 0.3
601 if impl(ghc < 8.0)
602 build-depends:
603 transformers >= 0.4 && < 0.6
604 else
605 buildable: False
607benchmark nested
608 import: bench-options
609 type: exitcode-stdio-1.0
610 hs-source-dirs: benchmark
611 main-is: Nested.hs
612 other-modules: NestedOps
613 build-depends:
614 streamly
615 , base >= 4.8 && < 5
616 , deepseq >= 1.4.1 && < 1.5
617 , random >= 1.0 && < 2.0
618 , gauge >= 0.2.4 && < 0.3
619 if impl(ghc < 8.0)
620 build-depends:
621 transformers >= 0.4 && < 0.6
623benchmark nestedUnfold
624 import: bench-options
625 type: exitcode-stdio-1.0
626 hs-source-dirs: benchmark
627 main-is: NestedUnfold.hs
628 other-modules: NestedUnfoldOps
629 build-depends:
630 streamly
631 , base >= 4.8 && < 5
632 , deepseq >= 1.4.1 && < 1.5
633 , random >= 1.0 && < 2.0
634 , gauge >= 0.2.4 && < 0.3
635 if impl(ghc < 8.0)
636 build-depends:
637 transformers >= 0.4 && < 0.6
639benchmark unpinned-array
640 import: bench-options
641 type: exitcode-stdio-1.0
642 hs-source-dirs: benchmark
643 main-is: Streamly/Benchmark/Data/Array.hs
644 other-modules: Streamly.Benchmark.Data.ArrayOps
645 build-depends:
646 streamly
647 , base >= 4.8 && < 5
648 , deepseq >= 1.4.1 && < 1.5
649 , random >= 1.0 && < 2.0
650 , gauge >= 0.2.4 && < 0.3
651 if impl(ghc < 8.0)
652 build-depends:
653 transformers >= 0.4 && < 0.6
655benchmark array
656 import: bench-options
657 type: exitcode-stdio-1.0
658 hs-source-dirs: benchmark
659 main-is: Array.hs
660 other-modules: ArrayOps
661 build-depends:
662 streamly
663 , base >= 4.8 && < 5
664 , deepseq >= 1.4.1 && < 1.5
665 , random >= 1.0 && < 2.0
666 , gauge >= 0.2.4 && < 0.3
667 if impl(ghc < 8.0)
668 build-depends:
669 transformers >= 0.4 && < 0.6
671benchmark fileio
672 import: bench-options
673 type: exitcode-stdio-1.0
674 -- A value of 400 works better for some benchmarks, however, it takes
675 -- extraordinary amount of time to compile with that.
676 -- ghc-options: -funfolding-use-threshold=150
677 hs-source-dirs: benchmark
678 main-is: FileIO.hs
679 if flag(benchmark)
680 buildable: True
681 build-depends:
682 streamly
683 , base >= 4.8 && < 5
684 , gauge >= 0.2.4 && < 0.3
685 , typed-process >= 0.2.3 && < 0.3
686 , deepseq >= 1.4.1 && < 1.5
687 else
688 buildable: False
690benchmark concurrent
691 import: bench-options
692 type: exitcode-stdio-1.0
693 hs-source-dirs: benchmark
694 main-is: Concurrent.hs
695 if flag(dev)
696 buildable: True
697 build-depends:
698 streamly
699 , base >= 4.8 && < 5
700 , gauge >= 0.2.4 && < 0.3
701 else
702 buildable: False
704-------------------------------------------------------------------------------
705-- Internal benchmarks for unexposed modules
706-------------------------------------------------------------------------------
708-- We have to copy the streamly library modules here because there is no
709-- way to use unexposed modules from the library.
711benchmark base
712 import: bench-options
713 type: exitcode-stdio-1.0
714 include-dirs: src/Streamly/Internal/Data/Time
715 , src/Streamly/Streams
716 if os(windows)
717 c-sources: src/Streamly/Internal/Data/Time/Windows.c
718 if os(darwin)
719 c-sources: src/Streamly/Internal/Data/Time/Darwin.c
720 hs-source-dirs: benchmark, src
721 main-is: BaseStreams.hs
722 other-modules: Streamly.Internal.Data.Atomics
723 , Streamly.Internal.Data.Stream.StreamD.Type
724 , Streamly.Internal.Data.SVar
725 , Streamly.Internal.Data.Time.Units
726 , Streamly.Internal.Data.Time.Clock
727 , Streamly.Internal.Data.Stream.StreamDK.Type
728 , Streamly.Internal.Data.Stream.StreamDK
729 , Streamly.Internal.Data.Stream.StreamK.Type
730 , Streamly.Internal.Data.Stream.StreamK
731 , Streamly.Internal.Data.Stream.StreamD
732 , Streamly.Internal.Data.Stream.Prelude
733 , Streamly.FileSystem.IOVec
735 , StreamDOps
736 , StreamKOps
737 , StreamDKOps
739 if flag(dev)
740 buildable: True
741 build-depends:
742 base >= 4.8 && < 5
743 , deepseq >= 1.4.1 && < 1.5
744 , random >= 1.0 && < 2.0
745 , gauge >= 0.2.4 && < 0.3
747 , ghc-prim >= 0.2 && < 0.6
748 , containers >= 0.5.8.2 && < 0.7
749 , heaps >= 0.3 && < 0.4
751 -- concurrency
752 , atomic-primops >= 0.8 && < 0.9
753 , lockfree-queue >= 0.2.3 && < 0.3
755 , exceptions >= 0.8 && < 0.11
756 , monad-control >= 1.0 && < 2
757 , mtl >= 2.2 && < 3
758 , transformers >= 0.4 && < 0.6
759 , transformers-base >= 0.4 && < 0.5
761 if impl(ghc < 8.0)
762 build-depends:
763 semigroups >= 0.18 && < 0.19
764 else
765 buildable: False
767executable nano-bench
768 import: bench-options
769 hs-source-dirs: benchmark, src
770 include-dirs: src/Streamly/Internal/Data/Time
771 , src/Streamly/Streams
772 if os(windows)
773 c-sources: src/Streamly/Internal/Data/Time/Windows.c
774 if os(darwin)
775 c-sources: src/Streamly/Internal/Data/Time/Darwin.c
776 main-is: NanoBenchmarks.hs
777 other-modules: Streamly.Internal.Data.Atomics
778 , Streamly.Internal.Data.Stream.StreamD.Type
779 , Streamly.Internal.Data.SVar
780 , Streamly.Internal.Data.Time.Units
781 , Streamly.Internal.Data.Time.Clock
782 , Streamly.Internal.Data.Stream.StreamK.Type
783 , Streamly.Internal.Data.Stream.StreamK
784 , Streamly.FileSystem.IOVec
785 , Streamly.Internal.Data.Stream.StreamD
786 if flag(dev)
787 buildable: True
788 build-depends:
789 base >= 4.8 && < 5
790 , gauge >= 0.2.4 && < 0.3
791 , ghc-prim >= 0.2 && < 0.6
792 , containers >= 0.5.8.2 && < 0.7
793 , deepseq >= 1.4.1 && < 1.5
794 , heaps >= 0.3 && < 0.4
795 , random >= 1.0 && < 2.0
797 -- concurrency
798 , atomic-primops >= 0.8 && < 0.9
799 , lockfree-queue >= 0.2.3 && < 0.3
801 , exceptions >= 0.8 && < 0.11
802 , monad-control >= 1.0 && < 2
803 , mtl >= 2.2 && < 3
804 , transformers >= 0.4 && < 0.6
805 , transformers-base >= 0.4 && < 0.5
806 else
807 buildable: False
809executable adaptive
810 import: bench-options
811 hs-source-dirs: benchmark
812 main-is: Adaptive.hs
813 default-language: Haskell2010
814 if flag(dev)
815 buildable: True
816 build-depends:
817 streamly
818 , base >= 4.8 && < 5
819 , gauge >= 0.2.4 && < 0.3
820 , random >= 1.0 && < 2.0
821 else
822 buildable: False
824executable chart
825 default-language: Haskell2010
826 ghc-options: -Wall
827 hs-source-dirs: benchmark
828 main-is: Chart.hs
829 if flag(dev) && !flag(no-charts) && !impl(ghcjs)
830 buildable: True
831 build-Depends:
832 base >= 4.8 && < 5
833 , bench-show >= 0.3 && < 0.4
834 , split
835 , transformers >= 0.4 && < 0.6
836 else
837 buildable: False
839-------------------------------------------------------------------------------
840-- Examples
841-------------------------------------------------------------------------------
843executable SearchQuery
844 import: exe-options
845 main-is: SearchQuery.hs
846 hs-source-dirs: examples
847 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
848 buildable: True
849 build-Depends:
850 streamly
851 , base >= 4.8 && < 5
852 , http-conduit >= 2.2.2 && < 2.4
853 else
854 buildable: False
856executable ListDir
857 import: exe-options
858 main-is: ListDir.hs
859 hs-source-dirs: examples
860 if flag(examples) || flag(examples-sdl)
861 buildable: True
862 build-Depends:
863 streamly
864 , base >= 4.8 && < 5
865 , directory >= 1.3 && < 1.4
866 if impl(ghc < 8.0)
867 build-depends:
868 transformers >= 0.4 && < 0.6
869 else
870 buildable: False
872executable MergeSort
873 import: exe-options
874 main-is: MergeSort.hs
875 hs-source-dirs: examples
876 if flag(examples) || flag(examples-sdl)
877 buildable: True
878 build-Depends:
879 streamly
880 , base >= 4.8 && < 5
881 , random >= 1.0.0 && < 2
882 else
883 buildable: False
885executable AcidRain
886 import: exe-options
887 main-is: AcidRain.hs
888 hs-source-dirs: examples
889 if flag(examples) || flag(examples-sdl)
890 buildable: True
891 build-Depends:
892 streamly
893 , base >= 4.8 && < 5
894 , mtl >= 2.2 && < 3
895 if impl(ghc < 8.0)
896 build-depends:
897 semigroups >= 0.18 && < 0.19
898 , transformers >= 0.4 && < 0.6
899 else
900 buildable: False
902executable CirclingSquare
903 import: exe-options
904 main-is: CirclingSquare.hs
905 hs-source-dirs: examples
906 if flag(examples-sdl)
907 buildable: True
908 build-Depends:
909 streamly
910 , base >= 4.8 && < 5
911 , SDL >= 0.6.5 && < 0.7
912 else
913 buildable: False
915executable ControlFlow
916 import: exe-options
917 main-is: ControlFlow.hs
918 hs-source-dirs: examples
919 if flag(examples) || flag(examples-sdl)
920 buildable: True
921 build-Depends:
922 streamly
923 , base >= 4.8 && < 5
924 , exceptions >= 0.8 && < 0.11
925 , transformers >= 0.4 && < 0.6
926 , transformers-base >= 0.4 && < 0.5
927 if impl(ghc < 8.0)
928 build-depends:
929 semigroups >= 0.18 && < 0.19
930 else
931 buildable: False
933executable HandleIO
934 import: exe-options
935 main-is: HandleIO.hs
936 hs-source-dirs: examples
937 if flag(examples) || flag(examples-sdl)
938 buildable: True
939 build-Depends:
940 streamly
941 , base >= 4.8 && < 5
942 else
943 buildable: False
945executable FileIOExamples
946 import: exe-options
947 main-is: FileIOExamples.hs
948 hs-source-dirs: examples
949 if flag(examples) || flag(examples-sdl)
950 buildable: True
951 build-Depends:
952 streamly
953 , base >= 4.8 && < 5
954 else
955 buildable: False
957executable EchoServer
958 import: exe-options
959 main-is: EchoServer.hs
960 hs-source-dirs: examples
961 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
962 buildable: True
963 build-Depends:
964 streamly
965 , base >= 4.8 && < 5
966 , network >= 2.6 && < 4
967 if impl(ghc < 8.0)
968 build-depends:
969 transformers >= 0.4 && < 0.6
970 else
971 buildable: False
973executable FileSinkServer
974 import: exe-options
975 main-is: FileSinkServer.hs
976 hs-source-dirs: examples
977 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
978 buildable: True
979 build-Depends:
980 streamly
981 , base >= 4.8 && < 5
982 , network >= 2.6 && < 4
983 if impl(ghc < 8.0)
984 build-depends:
985 transformers >= 0.4 && < 0.6
986 else
987 buildable: False
989executable FromFileClient
990 import: exe-options
991 main-is: FromFileClient.hs
992 hs-source-dirs: examples
993 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
994 buildable: True
995 build-Depends:
996 streamly
997 , base >= 4.8 && < 5
998 else
999 buildable: False
1001executable WordClassifier
1002 import: exe-options
1003 main-is: WordClassifier.hs
1004 hs-source-dirs: examples
1005 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1006 buildable: True
1007 build-Depends:
1008 streamly
1009 , base >= 4.8 && < 5
1010 , hashable >= 1.2 && < 1.4
1011 , unordered-containers >= 0.2 && < 0.3
1012 else
1013 buildable: False
1015executable WordCount
1016 import: exe-options
1017 main-is: WordCount.hs
1018 hs-source-dirs: examples
1019 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1020 buildable: True
1021 build-Depends:
1022 streamly
1023 , base >= 4.8 && < 5
1024 , vector >= 0.12 && < 0.13
1025 else
1026 buildable: False
1028executable CamelCase
1029 import: exe-options
1030 main-is: CamelCase.hs
1031 hs-source-dirs: examples
1032 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1033 buildable: True
1034 build-Depends:
1035 streamly
1036 , base >= 4.8 && < 5
1037 else
1038 buildable: False