on e9828b3 help sign in
streamly/streamly.cabal
1038 lines 34 kB history raw
1cabal-version: 2.2
2name: streamly
3version: 0.7.2
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==8.0.2
85 , GHC==8.4.4
86 , GHC==8.6.5
87 , GHC==8.8.1
88 , GHC==8.10.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 .circleci/config.yml
98 .github/workflows/haskell.yml
99 .gitignore
100 .hlint.ignore
101 .hlint.yaml
102 .travis.yml
103 CONTRIBUTING.md
104 Changelog.md
105 INSTALL.md
106 MAINTAINING.md
107 README.md
108 appveyor.yml
109 bench.sh
110 benchmark/*.hs
111 benchmark/README.md
112 benchmark/Streamly/Benchmark/Data/*.hs
113 benchmark/Streamly/Benchmark/Data/Parser/*.hs
114 benchmark/Streamly/Benchmark/Data/Stream/*.hs
115 benchmark/Streamly/Benchmark/FileSystem/*.hs
116 benchmark/Streamly/Benchmark/FileSystem/Handle/*.hs
117 benchmark/Streamly/Benchmark/Prelude/*.hs
118 benchmark/lib/Streamly/Benchmark/*.hs
119 benchmark/streamly-benchmarks.cabal
120 bin/bench-exec-one.sh
121 cabal.project.ci
122 charts-0/streamly-vs-list-time.svg
123 configure
124 configure.ac
125 credits/*.md
126 credits/Yampa-0.10.6.2.txt
127 credits/base-4.12.0.0.txt
128 credits/bjoern-2008-2009.txt
129 credits/clock-0.7.2.txt
130 credits/foldl-1.4.5.txt
131 credits/pipes-concurrency-2.0.8.txt
132 credits/primitive-0.7.0.0.txt
133 credits/transient-0.5.5.txt
134 credits/vector-0.12.0.2.txt
135 design/*.md
136 design/*.png
137 design/*.rst
138 docs/Build.md
139 docs/streamly-vs-async.md
140 docs/streamly-vs-lists.md
141 docs/transformers.md
142 examples/README.md
143 src/Streamly/Internal/Data/Stream/Instances.hs
144 src/Streamly/Internal/Data/Time/config-clock.h
145 src/Streamly/Internal/Data/Array/PrimInclude.hs
146 src/Streamly/Internal/Data/Array/Prim/TypesInclude.hs
147 src/Streamly/Internal/Data/Array/Prim/MutTypesInclude.hs
148 src/Streamly/Internal/Data/Time/config.h.in
149 src/inline.hs
150 stack.yaml
152extra-tmp-files:
153 config.log
154 config.status
155 autom4te.cache
156 src/Streamly/Internal/Data/Time/config.h
158source-repository head
159 type: git
160 location: https://github.com/composewell/streamly
162flag fusion-plugin
163 description: Use fusion plugin for benchmarks and executables
164 manual: True
165 default: False
167flag inspection
168 description: Enable inspection testing
169 manual: True
170 default: False
172flag debug
173 description: Debug build with asserts enabled
174 manual: True
175 default: False
177flag dev
178 description: Development build
179 manual: True
180 default: False
182flag has-llvm
183 description: Use llvm backend for code generation
184 manual: True
185 default: False
187flag no-fusion
188 description: Disable rewrite rules for stream fusion
189 manual: True
190 default: False
192flag streamk
193 description: Use CPS style streams when possible
194 manual: True
195 default: False
197flag examples
198 description: Build including examples
199 manual: True
200 default: False
202flag examples-sdl
203 description: Build including SDL examples
204 manual: True
205 default: False
207flag use-c-malloc
208 description: Use C malloc instead of GHC malloc
209 manual: True
210 default: False
212-------------------------------------------------------------------------------
213-- Common stanzas
214-------------------------------------------------------------------------------
216common compile-options
217 default-language: Haskell2010
218 if flag(streamk)
219 cpp-options: -DUSE_STREAMK_ONLY
221 if flag(no-fusion)
222 cpp-options: -DDISABLE_FUSION
224 if flag(dev)
225 cpp-options: -DDEVBUILD
227 if flag(inspection)
228 cpp-options: -DINSPECTION
230 if flag(use-c-malloc)
231 cpp-options: -DUSE_C_MALLOC
233 ghc-options: -Wall
234 -Wcompat
235 -Wunrecognised-warning-flags
236 -Widentities
237 -Wincomplete-record-updates
238 -Wincomplete-uni-patterns
239 -Wredundant-constraints
240 -Wnoncanonical-monad-instances
242 if flag(has-llvm)
243 ghc-options: -fllvm
245 if flag(dev)
246 ghc-options: -Wmissed-specialisations
247 -Wall-missed-specialisations
249 if flag(dev) || flag(debug)
250 ghc-options: -fno-ignore-asserts
252common default-extensions
253 default-extensions:
254 BangPatterns
255 CApiFFI
256 CPP
257 ConstraintKinds
258 DeriveDataTypeable
259 DeriveGeneric
260 DeriveTraversable
261 ExistentialQuantification
262 FlexibleContexts
263 FlexibleInstances
264 GeneralizedNewtypeDeriving
265 InstanceSigs
266 KindSignatures
267 LambdaCase
268 MagicHash
269 MultiParamTypeClasses
270 PatternSynonyms
271 RankNTypes
272 RecordWildCards
273 ScopedTypeVariables
274 TupleSections
275 TypeFamilies
276 ViewPatterns
278 -- MonoLocalBinds, enabled by TypeFamilies, causes performance
279 -- regressions. Disable it. This must come after TypeFamilies,
280 -- otherwise TypeFamilies will enable it again.
281 NoMonoLocalBinds
283 -- UndecidableInstances -- Does not show any perf impact
284 -- UnboxedTuples -- interferes with (#.)
286common optimization-options
287 ghc-options: -O2
288 -fdicts-strict
289 -fspec-constr-recursive=16
290 -fmax-worker-args=16
292common threading-options
293 ghc-options: -threaded
294 -with-rtsopts=-N
296-- We need optimization options here to optimize internal (non-inlined)
297-- versions of functions. Also, we have some benchmarking inspection tests
298-- part of the library when built with --benchmarks flag. Thos tests fail
299-- if we do not use optimization options here. It was observed that due to
300-- -O2 here some concurrent/nested benchmarks improved and others regressed.
301-- We can investigate a bit more here why the regression occurred.
302common lib-options
303 import: compile-options, optimization-options, default-extensions
305-- Compilation for coverage builds on CI machines takes too long without -O0
306-- XXX we should use coverage flag for that, -O0 may take too long to run tests
307-- in general.
308common test-options
309 import: compile-options, threading-options, default-extensions
311 ghc-options: -O0
312 -fno-ignore-asserts
313 -- XXX we need -O for plugin to work
314 -- if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
315 -- ghc-options: -fplugin Fusion.Plugin
316 -- build-depends:
317 -- fusion-plugin >= 0.2 && < 0.3
319common prelude-test-options
320 js-sources: jsbits/clock.js
321 hs-source-dirs: test
322 build-depends:
323 streamly
324 , base >= 4.9 && < 5
325 , QuickCheck >= 2.10 && < 2.15
326 , hspec >= 2.0 && < 3
327 default-language: Haskell2010
329-- Used by maxrate test, benchmarks and executables
330common exe-options
331 import: compile-options, optimization-options, threading-options
332 if flag(fusion-plugin) && !impl(ghcjs) && !impl(ghc < 8.6)
333 ghc-options: -fplugin Fusion.Plugin
334 build-depends:
335 fusion-plugin >= 0.2 && < 0.3
337-------------------------------------------------------------------------------
338-- Library
339-------------------------------------------------------------------------------
341library
342 import: lib-options
344 if impl(ghc >= 8.1)
345 default-extensions: TypeApplications
346 if impl(ghc >= 8.6)
347 default-extensions: QuantifiedConstraints
349 js-sources: jsbits/clock.js
350 include-dirs: src/Streamly/Internal/Data/Time
351 , src
352 if os(windows)
353 c-sources: src/Streamly/Internal/Data/Time/Windows.c
354 if os(darwin)
355 c-sources: src/Streamly/Internal/Data/Time/Darwin.c
356 hs-source-dirs: src
357 other-modules:
358 Streamly.Data.Array
359 , Streamly.Data.Prim.Array
360 , Streamly.Data.SmallArray
362 -- Memory storage
363 , Streamly.Memory.Ring
365 , Streamly.FileSystem.IOVec
366 , Streamly.FileSystem.FDIO
367 , Streamly.FileSystem.FD
369 exposed-modules:
370 Streamly.Prelude
371 , Streamly
372 , Streamly.Data.Fold
373 , Streamly.Data.Unfold
374 , Streamly.Data.Unicode.Stream
376 -- IO devices
377 , Streamly.Memory.Array
378 , Streamly.FileSystem.Handle
380 , Streamly.Tutorial
382 -- Internal modules
383 , Streamly.Internal.BaseCompat
384 , Streamly.Internal.Control.Monad
385 , Streamly.Internal.Data.Tuple.Strict
386 , Streamly.Internal.Data.Maybe.Strict
387 , Streamly.Internal.Data.Either.Strict
388 , Streamly.Internal.Data.Atomics
389 , Streamly.Internal.Data.Time
390 , Streamly.Internal.Data.Time.TimeSpec
391 , Streamly.Internal.Data.Time.Units
392 , Streamly.Internal.Data.Time.Clock
393 , Streamly.Internal.Data.SVar
395 -- Memory storage
396 , Streamly.Internal.Foreign.Malloc
398 -- Mutable data
399 , Streamly.Internal.Data.IORef.Prim
401 -- Arrays
402 , Streamly.Internal.Data.Array
403 , Streamly.Internal.Data.Array.Prim.Types
404 , Streamly.Internal.Data.Array.Prim
405 , Streamly.Internal.Data.Array.Prim.Mut.Types
406 , Streamly.Internal.Data.Array.Prim.Pinned.Types
407 , Streamly.Internal.Data.Array.Prim.Pinned
408 , Streamly.Internal.Data.Array.Prim.Pinned.Mut.Types
409 , Streamly.Internal.Data.SmallArray.Types
410 , Streamly.Internal.Data.SmallArray
411 , Streamly.Internal.Memory.Mutable.Array.Types
412 , Streamly.Internal.Memory.Array.Types
413 , Streamly.Internal.Memory.Array
414 , Streamly.Internal.Memory.ArrayStream
416 -- Folds
417 , Streamly.Internal.Data.Fold.Types
418 , Streamly.Internal.Data.Fold
419 , Streamly.Internal.Data.Sink.Types
420 , Streamly.Internal.Data.Sink
422 -- Parsers
423 , Streamly.Internal.Data.Parser.ParserK.Types
424 , Streamly.Internal.Data.Parser.ParserD.Types
425 , Streamly.Internal.Data.Parser.ParserD.Tee
426 , Streamly.Internal.Data.Parser.ParserD
427 , Streamly.Internal.Data.Parser
429 -- Base streams
430 , Streamly.Internal.Data.Stream.StreamK.Type
431 , Streamly.Internal.Data.Stream.StreamK
432 , Streamly.Internal.Data.Stream.StreamD.Type
433 , Streamly.Internal.Data.Stream.StreamD
434 , Streamly.Internal.Data.Stream.StreamDK.Type
435 , Streamly.Internal.Data.Stream.StreamDK
436 , Streamly.Internal.Data.Stream.Enumeration
437 , Streamly.Internal.Data.Stream.Prelude
439 -- Higher level streams
440 , Streamly.Internal.Data.Stream.IsStream
441 , Streamly.Internal.Data.Stream.SVar
442 , Streamly.Internal.Data.Stream.Serial
443 , Streamly.Internal.Data.Stream.Async
444 , Streamly.Internal.Data.Stream.Parallel
445 , Streamly.Internal.Data.Stream.Ahead
446 , Streamly.Internal.Data.Stream.Zip
447 , Streamly.Internal.Data.Stream.Combinators
448 , Streamly.Internal.Data.List
450 -- Unfolds
451 , Streamly.Internal.Data.Unfold.Types
452 , Streamly.Internal.Data.Unfold
454 -- Pipes
455 , Streamly.Internal.Data.Pipe.Types
456 , Streamly.Internal.Data.Pipe
458 -- Filesystem
459 , Streamly.Internal.FileSystem.Handle
460 , Streamly.Internal.FileSystem.Dir
461 , Streamly.Internal.FileSystem.File
463 -- Text Processing
464 , Streamly.Internal.Data.Unicode.Stream
465 , Streamly.Internal.Data.Unicode.Char
466 , Streamly.Internal.Memory.Unicode.Array
467 , Streamly.Internal.Unicode.Array.Prim.Pinned
469 -- Serialization/deserialization in binary format
470 , Streamly.Internal.Data.Binary.Decode
472 if !impl(ghcjs)
473 exposed-modules:
474 Streamly.Network.Socket
475 , Streamly.Network.Inet.TCP
477 , Streamly.Internal.Network.Socket
478 , Streamly.Internal.Network.Inet.TCP
480 build-depends:
481 -- Core libraries shipped with ghc, the min and max
482 -- constraints of these libraries should match with
483 -- the GHC versions we support
484 base >= 4.9 && < 5
485 , containers >= 0.5 && < 0.7
486 , deepseq >= 1.4.1 && < 1.5
487 , directory >= 1.2.2 && < 1.4
488 , exceptions >= 0.8 && < 0.11
489 , ghc-prim >= 0.2 && < 0.7
490 , mtl >= 2.2 && < 3
491 , primitive >= 0.5.4 && < 0.8
492 , transformers >= 0.4 && < 0.6
494 , heaps >= 0.3 && < 0.4
496 -- concurrency
497 , atomic-primops >= 0.8 && < 0.9
498 , lockfree-queue >= 0.2.3 && < 0.3
500 -- transfomers
501 , monad-control >= 1.0 && < 2
502 , transformers-base >= 0.4 && < 0.5
504 , fusion-plugin-types >= 0.1 && < 0.2
506 if !impl(ghcjs)
507 build-depends:
508 network >= 2.6 && < 4
510 if flag(inspection)
511 build-depends: template-haskell >= 2.14 && < 2.17
512 , inspection-testing >= 0.4 && < 0.5
514 -- Array uses a Storable constraint in dev build making several inspection
515 -- tests fail
516 if flag(dev) && flag(inspection)
517 build-depends: inspection-and-dev-flags-cannot-be-used-together
519-------------------------------------------------------------------------------
520-- Test suites
521-------------------------------------------------------------------------------
523test-suite test
524 import: test-options
525 type: exitcode-stdio-1.0
526 main-is: Main.hs
527 js-sources: jsbits/clock.js
528 hs-source-dirs: test
529 build-depends:
530 streamly
531 , base >= 4.9 && < 5
532 , hspec >= 2.0 && < 3
533 , containers >= 0.5 && < 0.7
534 , transformers >= 0.4 && < 0.6
535 , mtl >= 2.2 && < 3
536 , exceptions >= 0.8 && < 0.11
537 default-language: Haskell2010
539test-suite internal-prelude-test
540 import: test-options
541 type: exitcode-stdio-1.0
542 main-is: Streamly/Test/Internal/Prelude.hs
543 js-sources: jsbits/clock.js
544 hs-source-dirs: test
545 build-depends:
546 streamly
547 , base >= 4.9 && < 5
548 , QuickCheck >= 2.10 && < 2.15
549 , hspec >= 2.0 && < 3
550 default-language: Haskell2010
552test-suite pure-streams-base
553 import: test-options
554 type: exitcode-stdio-1.0
555 main-is: PureStreams.hs
556 hs-source-dirs: test
557 build-depends:
558 streamly
559 , base >= 4.9 && < 5
560 , hspec >= 2.0 && < 3
561 default-language: Haskell2010
563test-suite pure-streams-streamly
564 import: test-options
565 type: exitcode-stdio-1.0
566 main-is: PureStreams.hs
567 hs-source-dirs: test
568 cpp-options: -DUSE_STREAMLY_LIST
569 build-depends:
570 streamly
571 , base >= 4.9 && < 5
572 , hspec >= 2.0 && < 3
573 default-language: Haskell2010
575test-suite Prelude.Serial
576 import: test-options, prelude-test-options
577 type: exitcode-stdio-1.0
578 main-is: Streamly/Test/Prelude/Serial.hs
579 ghc-options: -main-is Streamly.Test.Prelude.Serial.main
580 other-modules: Streamly.Test.Common
581 , Streamly.Test.Prelude
583test-suite Prelude.WSerial
584 import: test-options, prelude-test-options
585 type: exitcode-stdio-1.0
586 main-is: Streamly/Test/Prelude/WSerial.hs
587 ghc-options: -main-is Streamly.Test.Prelude.WSerial.main
588 other-modules: Streamly.Test.Common
589 , Streamly.Test.Prelude
591test-suite Prelude.ZipSerial
592 import: test-options, prelude-test-options
593 type: exitcode-stdio-1.0
594 main-is: Streamly/Test/Prelude/ZipSerial.hs
595 ghc-options: -main-is Streamly.Test.Prelude.ZipSerial.main
596 other-modules: Streamly.Test.Common
597 , Streamly.Test.Prelude
599test-suite Prelude.ZipAsync
600 import: test-options, prelude-test-options
601 type: exitcode-stdio-1.0
602 main-is: Streamly/Test/Prelude/ZipAsync.hs
603 ghc-options: -main-is Streamly.Test.Prelude.ZipAsync.main
604 other-modules: Streamly.Test.Common
605 , Streamly.Test.Prelude
607test-suite Prelude.Ahead
608 import: test-options, prelude-test-options
609 type: exitcode-stdio-1.0
610 main-is: Streamly/Test/Prelude/Ahead.hs
611 ghc-options: -main-is Streamly.Test.Prelude.Ahead.main
612 other-modules: Streamly.Test.Common
613 , Streamly.Test.Prelude
615test-suite Prelude.Async
616 import: test-options, prelude-test-options
617 type: exitcode-stdio-1.0
618 main-is: Streamly/Test/Prelude/Async.hs
619 ghc-options: -main-is Streamly.Test.Prelude.Async.main
620 other-modules: Streamly.Test.Common
621 , Streamly.Test.Prelude
623test-suite Prelude.WAsync
624 import: test-options, prelude-test-options
625 type: exitcode-stdio-1.0
626 main-is: Streamly/Test/Prelude/WAsync.hs
627 ghc-options: -main-is Streamly.Test.Prelude.WAsync.main
628 other-modules: Streamly.Test.Common
629 , Streamly.Test.Prelude
631test-suite Prelude.Parallel
632 import: test-options, prelude-test-options
633 type: exitcode-stdio-1.0
634 main-is: Streamly/Test/Prelude/Parallel.hs
635 ghc-options: -main-is Streamly.Test.Prelude.Parallel.main
636 other-modules: Streamly.Test.Common
637 , Streamly.Test.Prelude
639test-suite Prelude.Concurrent
640 import: test-options, prelude-test-options
641 type: exitcode-stdio-1.0
642 main-is: Streamly/Test/Prelude/Concurrent.hs
643 ghc-options: -main-is Streamly.Test.Prelude.Concurrent.main
644 other-modules: Streamly.Test.Common
645 , Streamly.Test.Prelude
647test-suite array-test
648 import: test-options
649 type: exitcode-stdio-1.0
650 main-is: Streamly/Test/Array.hs
651 js-sources: jsbits/clock.js
652 hs-source-dirs: test
653 cpp-options: -DTEST_ARRAY
654 build-depends:
655 streamly
656 , base >= 4.9 && < 5
657 , QuickCheck >= 2.10 && < 2.15
658 , hspec >= 2.0 && < 3
659 default-language: Haskell2010
661test-suite internal-data-fold-test
662 import: test-options
663 type: exitcode-stdio-1.0
664 main-is: Streamly/Test/Internal/Data/Fold.hs
665 js-sources: jsbits/clock.js
666 hs-source-dirs: test
667 build-depends:
668 streamly
669 , base >= 4.9 && < 5
670 , hspec >= 2.0 && < 3
671 , QuickCheck >= 2.10 && < 2.15
672 default-language: Haskell2010
674test-suite internal-data-parser-test
675 import: test-options
676 ghc-options: -O2
677 type: exitcode-stdio-1.0
678 main-is: Streamly/Test/Internal/Data/Parser.hs
679 js-sources: jsbits/clock.js
680 hs-source-dirs: test
681 build-depends:
682 streamly
683 , base >= 4.9 && < 5
684 , hspec >= 2.0 && < 3
685 , QuickCheck >= 2.10 && < 2.15
686 , transformers >= 0.4 && < 0.6
687 default-language: Haskell2010
689test-suite internal-data-parser-parserd-test
690 import: test-options
691 type: exitcode-stdio-1.0
692 main-is: Streamly/Test/Internal/Data/Parser/ParserD.hs
693 js-sources: jsbits/clock.js
694 hs-source-dirs: test
695 build-depends:
696 streamly
697 , base >= 4.9 && < 5
698 , hspec >= 2.0 && < 3
699 , QuickCheck >= 2.10 && < 2.15
700 , transformers >= 0.4 && < 0.6
701 default-language: Haskell2010
703test-suite data-array-test
704 import: test-options
705 type: exitcode-stdio-1.0
706 main-is: Streamly/Test/Array.hs
707 js-sources: jsbits/clock.js
708 hs-source-dirs: test
709 build-depends:
710 streamly
711 , base >= 4.9 && < 5
712 , QuickCheck >= 2.10 && < 2.15
713 , hspec >= 2.0 && < 3
714 default-language: Haskell2010
716test-suite smallarray-test
717 import: test-options
718 type: exitcode-stdio-1.0
719 main-is: Streamly/Test/Array.hs
720 js-sources: jsbits/clock.js
721 hs-source-dirs: test
722 cpp-options: -DTEST_SMALL_ARRAY
723 build-depends:
724 streamly
725 , base >= 4.9 && < 5
726 , QuickCheck >= 2.10 && < 2.15
727 , hspec >= 2.0 && < 3
728 default-language: Haskell2010
730test-suite primarray-test
731 import: test-options
732 type: exitcode-stdio-1.0
733 main-is: Streamly/Test/Array.hs
734 js-sources: jsbits/clock.js
735 hs-source-dirs: test
736 cpp-options: -DDATA_ARRAY_PRIM
737 build-depends:
738 streamly
739 , base >= 4.9 && < 5
740 , QuickCheck >= 2.10 && < 2.15
741 , hspec >= 2.0 && < 3
742 default-language: Haskell2010
744test-suite prim-pinned-array-test
745 import: test-options
746 type: exitcode-stdio-1.0
747 main-is: Streamly/Test/Array.hs
748 js-sources: jsbits/clock.js
749 hs-source-dirs: test
750 cpp-options: -DDATA_ARRAY_PRIM_PINNED
751 build-depends:
752 streamly
753 , base >= 4.9 && < 5
754 , QuickCheck >= 2.10 && < 2.15
755 , hspec >= 2.0 && < 3
756 default-language: Haskell2010
758test-suite string-test
759 import: test-options
760 type: exitcode-stdio-1.0
761 main-is: String.hs
762 js-sources: jsbits/clock.js
763 hs-source-dirs: test
764 build-depends:
765 streamly
766 , base >= 4.9 && < 5
767 , QuickCheck >= 2.10 && < 2.15
768 , hspec >= 2.0 && < 3
769 default-language: Haskell2010
771test-suite maxrate
772 import: exe-options
773 type: exitcode-stdio-1.0
774 default-language: Haskell2010
775 main-is: MaxRate.hs
776 js-sources: jsbits/clock.js
777 hs-source-dirs: test
778 if flag(dev)
779 buildable: True
780 build-Depends:
781 streamly
782 , base >= 4.9 && < 5
783 , hspec >= 2.0 && < 3
784 , random >= 1.0.0 && < 2
785 else
786 buildable: False
788test-suite loops
789 import: test-options
790 type: exitcode-stdio-1.0
791 default-language: Haskell2010
792 main-is: loops.hs
793 hs-source-dirs: test
794 build-Depends:
795 streamly
796 , base >= 4.9 && < 5
798test-suite nested-loops
799 import: test-options
800 type: exitcode-stdio-1.0
801 default-language: Haskell2010
802 main-is: nested-loops.hs
803 hs-source-dirs: test
804 build-Depends:
805 streamly
806 , base >= 4.9 && < 5
807 , random >= 1.0.0 && < 2
809test-suite parallel-loops
810 import: test-options
811 type: exitcode-stdio-1.0
812 default-language: Haskell2010
813 main-is: parallel-loops.hs
814 hs-source-dirs: test
815 build-Depends:
816 streamly
817 , base >= 4.9 && < 5
818 , random >= 1.0.0 && < 2
820test-suite version-bounds
821 import: test-options
822 type: exitcode-stdio-1.0
823 default-language: Haskell2010
824 main-is: version-bounds.hs
825 hs-source-dirs: test
826 build-Depends:
827 streamly
828 , ghc
829 , base >= 4.9 && < 5
831-------------------------------------------------------------------------------
832-- Examples
833-------------------------------------------------------------------------------
835executable SearchQuery
836 import: exe-options
837 main-is: SearchQuery.hs
838 hs-source-dirs: examples
839 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
840 buildable: True
841 build-depends:
842 streamly
843 , base >= 4.9 && < 5
844 , http-conduit >= 2.2.2 && < 2.4
845 else
846 buildable: False
848executable ListDir
849 import: exe-options
850 main-is: ListDir.hs
851 hs-source-dirs: examples
852 if flag(examples) || flag(examples-sdl)
853 buildable: True
854 build-Depends:
855 streamly
856 , base >= 4.9 && < 5
857 else
858 buildable: False
860executable MergeSort
861 import: exe-options
862 main-is: MergeSort.hs
863 hs-source-dirs: examples
864 if flag(examples) || flag(examples-sdl)
865 buildable: True
866 build-Depends:
867 streamly
868 , base >= 4.9 && < 5
869 , random >= 1.0.0 && < 2
870 else
871 buildable: False
873executable AcidRain
874 import: exe-options
875 main-is: AcidRain.hs
876 hs-source-dirs: examples
877 if flag(examples) || flag(examples-sdl)
878 buildable: True
879 build-Depends:
880 streamly
881 , base >= 4.9 && < 5
882 , mtl >= 2.2 && < 3
883 else
884 buildable: False
886executable CirclingSquare
887 import: exe-options
888 main-is: CirclingSquare.hs
889 hs-source-dirs: examples
890 if flag(examples-sdl)
891 buildable: True
892 build-Depends:
893 streamly
894 , base >= 4.9 && < 5
895 , SDL >= 0.6.5 && < 0.7
896 else
897 buildable: False
899executable ControlFlow
900 import: exe-options
901 main-is: ControlFlow.hs
902 hs-source-dirs: examples
903 if flag(examples) || flag(examples-sdl)
904 buildable: True
905 build-Depends:
906 streamly
907 , base >= 4.9 && < 5
908 , exceptions >= 0.8 && < 0.11
909 , transformers >= 0.4 && < 0.6
910 , transformers-base >= 0.4 && < 0.5
911 else
912 buildable: False
914executable HandleIO
915 import: exe-options
916 main-is: HandleIO.hs
917 hs-source-dirs: examples
918 if flag(examples) || flag(examples-sdl)
919 buildable: True
920 build-Depends:
921 streamly
922 , base >= 4.9 && < 5
923 else
924 buildable: False
926executable FileIOExamples
927 import: exe-options
928 main-is: FileIOExamples.hs
929 hs-source-dirs: examples
930 if flag(examples) || flag(examples-sdl)
931 buildable: True
932 build-Depends:
933 streamly
934 , base >= 4.9 && < 5
935 else
936 buildable: False
938executable EchoServer
939 import: exe-options
940 main-is: EchoServer.hs
941 hs-source-dirs: examples
942 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
943 buildable: True
944 build-Depends:
945 streamly
946 , base >= 4.9 && < 5
947 , network >= 2.6 && < 4
948 else
949 buildable: False
951executable FileSinkServer
952 import: exe-options
953 main-is: FileSinkServer.hs
954 hs-source-dirs: examples
955 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
956 buildable: True
957 build-Depends:
958 streamly
959 , base >= 4.9 && < 5
960 , network >= 2.6 && < 4
961 else
962 buildable: False
964executable FromFileClient
965 import: exe-options
966 main-is: FromFileClient.hs
967 hs-source-dirs: examples
968 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
969 buildable: True
970 build-Depends:
971 streamly
972 , base >= 4.9 && < 5
973 else
974 buildable: False
976executable WordClassifier
977 import: exe-options
978 main-is: WordClassifier.hs
979 hs-source-dirs: examples
980 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
981 buildable: True
982 build-Depends:
983 streamly
984 , base >= 4.9 && < 5
985 , hashable >= 1.2 && < 1.4
986 , unordered-containers >= 0.2 && < 0.3
987 else
988 buildable: False
990executable WordCount
991 import: exe-options
992 main-is: WordCount.hs
993 hs-source-dirs: examples
994 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
995 buildable: True
996 build-Depends:
997 streamly
998 , base >= 4.9 && < 5
999 , vector >= 0.12 && < 0.13
1000 else
1001 buildable: False
1003executable CamelCase
1004 import: exe-options
1005 main-is: CamelCase.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.9 && < 5
1012 else
1013 buildable: False
1015executable Rate
1016 import: exe-options
1017 main-is: Rate.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.9 && < 5
1024 else
1025 buildable: False
1027executable Split
1028 import: exe-options
1029 main-is: Split.hs
1030 hs-source-dirs: examples
1031 if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
1032 buildable: True
1033 build-Depends:
1034 streamly
1035 , base >= 4.9 && < 5
1036 , mtl >= 2.2 && < 3
1037 else
1038 buildable: False