on 5cbcd5b help sign in
streamly/streamly.cabal
559 lines 19 kB history raw
1name: streamly
2version: 0.5.1
3synopsis: Beautiful Streaming, Concurrent and Reactive Composition
4description:
5 Streamly, short for streaming concurrently, provides monadic streams, with a
6 simple API, almost identical to standard lists, and an in-built support for
7 concurrency. By using stream-style combinators on stream composition,
8 streams can be generated, merged, chained, mapped, zipped, and consumed
9 concurrently – providing a generalized high level programming framework
10 unifying streaming and concurrency. Controlled concurrency allows even
11 infinite streams to be evaluated concurrently. Concurrency is auto scaled
12 based on feedback from the stream consumer. The programmer does not have to
13 be aware of threads, locking or synchronization to write scalable concurrent
14 programs.
15 .
16 The basic streaming functionality of streamly is equivalent to that provided by
17 streaming libraries like
18 <https://hackage.haskell.org/package/vector vector>,
19 <https://hackage.haskell.org/package/streaming streaming>,
20 <https://hackage.haskell.org/package/pipes pipes>, and
21 <https://hackage.haskell.org/package/conduit conduit>.
22 In addition to providing streaming functionality, streamly subsumes the
23 functionality of list transformer libraries like @pipes@ or
24 <https://hackage.haskell.org/package/list-t list-t> and also the logic
25 programming library <https://hackage.haskell.org/package/logict logict>. On
26 the concurrency side, it subsumes the functionality of the
27 <https://hackage.haskell.org/package/async async> package. Because it
28 supports streaming with concurrency we can write FRP applications similar in
29 concept to <https://hackage.haskell.org/package/Yampa Yampa> or
30 <https://hackage.haskell.org/package/reflex reflex>.
31 .
32 For file IO, currently the library provides only one API to stream the lines
33 in the file as Strings. Future versions will provide better streaming file
34 IO options. Streamly interworks with the popular streaming libraries, see
35 the interworking section in "Streamly.Tutorial".
36 .
37 Why use streamly?
38 .
39 * /Simplicity/: Simple list like streaming API, if you know how to use lists
40 then you know how to use streamly. This library is built with simplicity
41 and ease of use as a primary design goal.
42 * /Concurrency/: Simple, powerful, and scalable concurrency. Concurrency is
43 built-in, and not intrusive, concurrent programs are written exactly the
44 same way as non-concurrent ones.
45 * /Generality/: Unifies functionality provided by several disparate packages
46 (streaming, concurrency, list transformer, logic programming, reactive
47 programming) in a concise API.
48 * /Performance/: Streamly is designed for high performance.
49 It employs stream fusion optimizations for best possible performance.
50 Serial peformance is equivalent to the venerable `vector` library in most
51 cases and even better in some cases. Concurrent performance is unbeatable.
52 See
53 <https://github.com/composewell/streaming-benchmarks streaming-benchmarks>
54 for a comparison of popular streaming libraries on micro-benchmarks.
55 .
56 Where to find more information:
57 .
58 * /Quick Overview/: <src/README.md README file> in the package
59 * /Detailed Tutorial/: "Streamly.Tutorial" module in the haddock documentation
60 * /Reference Documentation/: Haddock documentation for the respective modules
61 * /Examples/: <src/examples examples directory> in the package
62 * /Guides/: <src/docs docs directory> in the package, for documentation on
63 advanced topics, limitations, semantics of the library or on specific use
64 cases.
66homepage: https://github.com/composewell/streamly
67bug-reports: https://github.com/composewell/streamly/issues
68license: BSD3
69license-file: LICENSE
70tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
71author: Harendra Kumar
72maintainer: harendra.kumar@gmail.com
73copyright: 2017 Harendra Kumar
74category: Control, Concurrency, Streaming, Reactivity
75stability: Experimental
76build-type: Simple
77cabal-version: >= 1.10
79extra-source-files:
80 Changelog.md
81 README.md
82 docs/streamly-vs-async.md
83 docs/transformers.md
84 bench.sh
85 stack-7.10.yaml
86 stack-8.0.yaml
87 stack.yaml
88 src/Streamly/Streams/Instances.hs
89 src/Streamly/Streams/inline.h
91source-repository head
92 type: git
93 location: https://github.com/composewell/streamly
95flag dev
96 description: Development build
97 manual: True
98 default: False
100flag no-fusion
101 description: Disable rewrite rules
102 manual: True
103 default: False
105flag streamk
106 description: Use CPS style streams when possible
107 manual: True
108 default: False
110flag examples
111 description: Build including examples
112 manual: True
113 default: False
115flag examples-sdl
116 description: Build including SDL examples
117 manual: True
118 default: False
120-------------------------------------------------------------------------------
121-- Library
122-------------------------------------------------------------------------------
124library
125 hs-source-dirs: src
126 other-modules: Streamly.SVar
127 , Streamly.Streams.StreamK
128 , Streamly.Streams.StreamD
129 , Streamly.Streams.Serial
130 , Streamly.Streams.SVar
131 , Streamly.Streams.Async
132 , Streamly.Streams.Parallel
133 , Streamly.Streams.Ahead
134 , Streamly.Streams.Zip
135 , Streamly.Streams.Prelude
137 exposed-modules: Streamly.Prelude
138 , Streamly.Time
139 , Streamly
140 , Streamly.Tutorial
141 , Streamly.Internal
143 default-language: Haskell2010
144 ghc-options: -Wall
146 if flag(streamk)
147 cpp-options: -DUSE_STREAMK_ONLY
149 if flag(no-fusion)
150 cpp-options: -DDISABLE_FUSION
152 if flag(dev)
153 ghc-options: -Wmissed-specialisations
154 -Wall-missed-specialisations
155 -fno-ignore-asserts
156 if impl(ghc >= 8.0)
157 ghc-options: -Wcompat
158 -Wunrecognised-warning-flags
159 -Widentities
160 -Wincomplete-record-updates
161 -Wincomplete-uni-patterns
162 -Wredundant-constraints
163 -Wnoncanonical-monad-instances
164 -Wnoncanonical-monadfail-instances
166 build-depends: base >= 4.8 && < 5
167 , ghc-prim >= 0.2 && < 0.6
168 , containers >= 0.5 && < 0.7
169 , heaps >= 0.3 && < 0.4
171 -- concurrency
172 , atomic-primops >= 0.8 && < 0.9
173 , lockfree-queue >= 0.2.3 && < 0.3
174 , clock >= 0.7.1 && < 0.8
176 -- transfomers
177 , exceptions >= 0.8 && < 0.11
178 , monad-control >= 1.0 && < 2
179 , mtl >= 2.2 && < 3
180 , transformers >= 0.4 && < 0.6
181 , transformers-base >= 0.4 && < 0.5
183 if impl(ghc < 8.0)
184 build-depends:
185 semigroups >= 0.18 && < 0.19
187-------------------------------------------------------------------------------
188-- Test suites
189-------------------------------------------------------------------------------
191-- Compilation for coverage builds on CI machines takes too long without -O0
193test-suite test
194 type: exitcode-stdio-1.0
195 main-is: Main.hs
196 hs-source-dirs: test
197 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
198 if flag(dev)
199 cpp-options: -DDEVBUILD
200 ghc-options: -Wmissed-specialisations
201 -Wall-missed-specialisations
202 if impl(ghc >= 8.0)
203 ghc-options: -Wcompat
204 -Wunrecognised-warning-flags
205 -Widentities
206 -Wincomplete-record-updates
207 -Wincomplete-uni-patterns
208 -Wredundant-constraints
209 -Wnoncanonical-monad-instances
210 -Wnoncanonical-monadfail-instances
211 build-depends:
212 streamly
213 , base >= 4.8 && < 5
214 , hspec >= 2.0 && < 3
215 , containers >= 0.5 && < 0.7
216 , transformers >= 0.4 && < 0.6
217 , mtl >= 2.2 && < 3
218 , exceptions >= 0.8 && < 0.11
219 default-language: Haskell2010
221test-suite properties
222 type: exitcode-stdio-1.0
223 main-is: Prop.hs
224 hs-source-dirs: test
225 ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
226 if flag(dev)
227 cpp-options: -DDEVBUILD
228 ghc-options: -Wmissed-specialisations
229 -Wall-missed-specialisations
230 if impl(ghc >= 8.0)
231 ghc-options: -Wcompat
232 -Wunrecognised-warning-flags
233 -Widentities
234 -Wincomplete-record-updates
235 -Wincomplete-uni-patterns
236 -Wredundant-constraints
237 -Wnoncanonical-monad-instances
238 -Wnoncanonical-monadfail-instances
239 build-depends:
240 streamly
241 , base >= 4.8 && < 5
242 , QuickCheck >= 2.10 && < 2.13
243 , hspec >= 2.0 && < 3
244 if impl(ghc < 8.0)
245 build-depends:
246 transformers >= 0.4 && < 0.6
247 default-language: Haskell2010
249test-suite maxrate
250 type: exitcode-stdio-1.0
251 default-language: Haskell2010
252 main-is: MaxRate.hs
253 hs-source-dirs: test
254 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
255 if flag(dev)
256 buildable: True
257 build-Depends:
258 streamly
259 , base >= 4.8 && < 5
260 , clock >= 0.7.1 && < 0.8
261 , hspec >= 2.0 && < 3
262 , random >= 1.0.0 && < 1.2
263 else
264 buildable: False
266test-suite loops
267 type: exitcode-stdio-1.0
268 default-language: Haskell2010
269 main-is: loops.hs
270 hs-source-dirs: test
271 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
272 build-Depends:
273 streamly
274 , base >= 4.8 && < 5
276test-suite nested-loops
277 type: exitcode-stdio-1.0
278 default-language: Haskell2010
279 main-is: nested-loops.hs
280 hs-source-dirs: test
281 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
282 build-Depends:
283 streamly
284 , base >= 4.8 && < 5
285 , random >= 1.0.0 && < 1.2
287test-suite parallel-loops
288 type: exitcode-stdio-1.0
289 default-language: Haskell2010
290 main-is: parallel-loops.hs
291 hs-source-dirs: test
292 ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
293 build-Depends:
294 streamly
295 , base >= 4.8 && < 5
296 , random >= 1.0.0 && < 1.2
298-------------------------------------------------------------------------------
299-- Benchmarks
300-------------------------------------------------------------------------------
302benchmark linear
303 type: exitcode-stdio-1.0
304 hs-source-dirs: benchmark
305 main-is: Linear.hs
306 other-modules: LinearOps
307 default-language: Haskell2010
308 ghc-options: -O2 -Wall
309 if flag(dev)
310 ghc-options: -Wmissed-specialisations
311 -Wall-missed-specialisations
312 -fno-ignore-asserts
313 if impl(ghc >= 8.0)
314 ghc-options: -Wcompat
315 -Wunrecognised-warning-flags
316 -Widentities
317 -Wincomplete-record-updates
318 -Wincomplete-uni-patterns
319 -Wredundant-constraints
320 -Wnoncanonical-monad-instances
321 -Wnoncanonical-monadfail-instances
322 build-depends:
323 streamly
324 , base >= 4.8 && < 5
325 , deepseq >= 1.4.0 && < 1.5
326 , random >= 1.0 && < 2.0
327 , gauge >= 0.2.4 && < 0.3
329benchmark linear-async
330 type: exitcode-stdio-1.0
331 hs-source-dirs: benchmark
332 main-is: LinearAsync.hs
333 other-modules: LinearOps
334 default-language: Haskell2010
335 ghc-options: -O2 -Wall
336 cpp-options: -DLINEAR_ASYNC
337 if flag(dev)
338 ghc-options: -Wmissed-specialisations
339 -Wall-missed-specialisations
340 -fno-ignore-asserts
341 if impl(ghc >= 8.0)
342 ghc-options: -Wcompat
343 -Wunrecognised-warning-flags
344 -Widentities
345 -Wincomplete-record-updates
346 -Wincomplete-uni-patterns
347 -Wredundant-constraints
348 -Wnoncanonical-monad-instances
349 -Wnoncanonical-monadfail-instances
350 build-depends:
351 streamly
352 , base >= 4.8 && < 5
353 , deepseq >= 1.4.0 && < 1.5
354 , random >= 1.0 && < 2.0
355 , gauge >= 0.2.4 && < 0.3
357benchmark linear-rate
358 type: exitcode-stdio-1.0
359 hs-source-dirs: benchmark
360 main-is: LinearRate.hs
361 other-modules: LinearOps
362 default-language: Haskell2010
363 ghc-options: -O2 -Wall
364 if flag(dev)
365 ghc-options: -Wmissed-specialisations
366 -Wall-missed-specialisations
367 -fno-ignore-asserts
368 if impl(ghc >= 8.0)
369 ghc-options: -Wcompat
370 -Wunrecognised-warning-flags
371 -Widentities
372 -Wincomplete-record-updates
373 -Wincomplete-uni-patterns
374 -Wredundant-constraints
375 -Wnoncanonical-monad-instances
376 -Wnoncanonical-monadfail-instances
377 build-depends:
378 streamly
379 , base >= 4.8 && < 5
380 , deepseq >= 1.4.0 && < 1.5
381 , random >= 1.0 && < 2.0
382 , gauge >= 0.2.4 && < 0.3
384benchmark nested
385 type: exitcode-stdio-1.0
386 hs-source-dirs: benchmark
387 main-is: Nested.hs
388 other-modules: NestedOps
389 default-language: Haskell2010
390 ghc-options: -O2 -Wall
391 if flag(dev)
392 ghc-options: -Wmissed-specialisations
393 -Wall-missed-specialisations
394 -fno-ignore-asserts
395 if impl(ghc >= 8.0)
396 ghc-options: -Wcompat
397 -Wunrecognised-warning-flags
398 -Widentities
399 -Wincomplete-record-updates
400 -Wincomplete-uni-patterns
401 -Wredundant-constraints
402 -Wnoncanonical-monad-instances
403 -Wnoncanonical-monadfail-instances
404 build-depends:
405 streamly
406 , base >= 4.8 && < 5
407 , deepseq >= 1.4.0 && < 1.5
408 , random >= 1.0 && < 2.0
409 , gauge >= 0.2.4 && < 0.3
411-------------------------------------------------------------------------------
412-- Internal benchmarks for unexposed modules
413-------------------------------------------------------------------------------
415-- We have to copy the streamly library modules here because there is no
416-- way to use unexposed modules from the library.
418benchmark base
419 type: exitcode-stdio-1.0
420 hs-source-dirs: benchmark, src
421 main-is: BaseStreams.hs
422 other-modules: Streamly.SVar
423 , Streamly.Streams.StreamK
424 , Streamly.Streams.StreamD
425 , Streamly.Streams.Prelude
427 , StreamDOps
428 , StreamKOps
430 default-language: Haskell2010
431 ghc-options: -O2 -Wall
432 if flag(dev)
433 ghc-options: -Wmissed-specialisations
434 -Wall-missed-specialisations
435 -fno-ignore-asserts
436 if impl(ghc >= 8.0)
437 ghc-options: -Wcompat
438 -Wunrecognised-warning-flags
439 -Widentities
440 -Wincomplete-record-updates
441 -Wincomplete-uni-patterns
442 -Wredundant-constraints
443 -Wnoncanonical-monad-instances
444 -Wnoncanonical-monadfail-instances
446 build-depends:
447 base >= 4.8 && < 5
448 , deepseq >= 1.4.0 && < 1.5
449 , random >= 1.0 && < 2.0
450 , gauge >= 0.2.4 && < 0.3
452 , ghc-prim >= 0.2 && < 0.6
453 , containers >= 0.5 && < 0.7
454 , heaps >= 0.3 && < 0.4
456 -- concurrency
457 , atomic-primops >= 0.8 && < 0.9
458 , lockfree-queue >= 0.2.3 && < 0.3
459 , clock >= 0.7.1 && < 0.8
461 , exceptions >= 0.8 && < 0.11
462 , monad-control >= 1.0 && < 2
463 , mtl >= 2.2 && < 3
464 , transformers >= 0.4 && < 0.6
465 , transformers-base >= 0.4 && < 0.5
467 if impl(ghc < 8.0)
468 build-depends:
469 semigroups >= 0.18 && < 0.19
471executable chart
472 default-language: Haskell2010
473 hs-source-dirs: benchmark
474 main-is: Chart.hs
475 if flag(dev)
476 buildable: True
477 build-Depends:
478 base >= 4.8 && < 5
479 , bench-show >= 0.2 && < 0.3
480 , split
481 , transformers
482 else
483 buildable: False
485-------------------------------------------------------------------------------
486-- Examples
487-------------------------------------------------------------------------------
489executable SearchQuery
490 default-language: Haskell2010
491 main-is: SearchQuery.hs
492 hs-source-dirs: examples
493 if flag(examples) || flag(examples-sdl)
494 buildable: True
495 build-Depends:
496 streamly
497 , base >= 4.8 && < 5
498 , http-conduit >= 2.2.2 && < 2.4
499 else
500 buildable: False
502executable ListDir
503 default-language: Haskell2010
504 main-is: ListDir.hs
505 hs-source-dirs: examples
506 if flag(examples) || flag(examples-sdl)
507 buildable: True
508 build-Depends:
509 streamly
510 , base >= 4.8 && < 5
511 , path-io >= 0.1.0 && < 1.4
512 if impl(ghc < 8.0)
513 build-depends:
514 transformers >= 0.4 && < 0.6
515 else
516 buildable: False
518executable MergeSort
519 default-language: Haskell2010
520 main-is: MergeSort.hs
521 hs-source-dirs: examples
522 if flag(examples) || flag(examples-sdl)
523 buildable: True
524 build-Depends:
525 streamly
526 , base >= 4.8 && < 5
527 , random >= 1.0.0 && < 1.2
528 else
529 buildable: False
531executable AcidRain
532 default-language: Haskell2010
533 main-is: AcidRain.hs
534 hs-source-dirs: examples
535 if flag(examples) || flag(examples-sdl)
536 buildable: True
537 build-Depends:
538 streamly
539 , base >= 4.8 && < 5
540 , mtl >= 2.2 && < 3
541 if impl(ghc < 8.0)
542 build-depends:
543 semigroups >= 0.18 && < 0.19
544 , transformers >= 0.4 && < 0.6
545 else
546 buildable: False
548executable CirclingSquare
549 default-language: Haskell2010
550 main-is: CirclingSquare.hs
551 hs-source-dirs: examples
552 if flag(examples-sdl)
553 buildable: True
554 build-Depends:
555 streamly
556 , base >= 4.8 && < 5
557 , SDL >= 0.6.5 && < 0.7
558 else
559 buildable: False