on ec08681 help sign in
streamly/streamly.cabal
490 lines 16 kB history raw
1name: streamly
2version: 0.4.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 * @README@ shipped with the package for a quick overview
59 * "Streamly.Tutorial" module in the haddock documentation for a detailed introduction
60 * @examples@ directory in the package for some simple practical examples
62homepage: https://github.com/composewell/streamly
63bug-reports: https://github.com/composewell/streamly/issues
64license: BSD3
65license-file: LICENSE
66tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.3
67author: Harendra Kumar
68maintainer: harendra.kumar@gmail.com
69copyright: 2017 Harendra Kumar
70category: Control, Concurrency, Streaming, Reactivity
71stability: Experimental
72build-type: Simple
73cabal-version: >= 1.10
75extra-source-files:
76 Changelog.md
77 README.md
78 bench.sh
79 stack-7.10.yaml
80 stack-8.0.yaml
81 stack.yaml
82 src/Streamly/Streams/Instances.hs
83 src/Streamly/Streams/inline.h
85source-repository head
86 type: git
87 location: https://github.com/composewell/streamly
89flag diag
90 description: Diagnostics build
91 manual: True
92 default: False
94flag dev
95 description: Development build
96 manual: True
97 default: False
99flag no-fusion
100 description: Disable rewrite rules
101 manual: True
102 default: False
104flag streamk
105 description: Use CPS style streams when possible
106 manual: True
107 default: False
109flag examples
110 description: Build including examples
111 manual: True
112 default: False
114flag examples-sdl
115 description: Build including SDL examples
116 manual: True
117 default: False
119-------------------------------------------------------------------------------
120-- Library
121-------------------------------------------------------------------------------
123library
124 hs-source-dirs: src
125 other-modules: Streamly.SVar
126 , Streamly.Streams.StreamK
127 , Streamly.Streams.StreamD
128 , Streamly.Streams.Serial
129 , Streamly.Streams.SVar
130 , Streamly.Streams.Async
131 , Streamly.Streams.Parallel
132 , Streamly.Streams.Ahead
133 , Streamly.Streams.Zip
134 , Streamly.Streams.Prelude
136 exposed-modules: Streamly.Prelude
137 , Streamly.Time
138 , Streamly
139 , Streamly.Tutorial
141 default-language: Haskell2010
142 ghc-options: -Wall
144 if flag(streamk)
145 cpp-options: -DUSE_STREAMK_ONLY
147 if flag(no-fusion)
148 cpp-options: -DDISABLE_FUSION
150 if flag(diag)
151 cpp-options: -DDIAGNOSTICS
153 if flag(dev)
154 cpp-options: -DDIAGNOSTICS
155 ghc-options: -Wmissed-specialisations
156 -Wall-missed-specialisations
157 -fno-ignore-asserts
158 if impl(ghc >= 8.0)
159 ghc-options: -Wcompat
160 -Wunrecognised-warning-flags
161 -Widentities
162 -Wincomplete-record-updates
163 -Wincomplete-uni-patterns
164 -Wredundant-constraints
165 -Wnoncanonical-monad-instances
166 -Wnoncanonical-monadfail-instances
168 build-depends: base >= 4.8 && < 5
169 , ghc-prim >= 0.2 && < 0.6
170 , containers >= 0.5 && < 0.6
171 , heaps >= 0.3 && < 0.4
173 -- concurrency
174 , atomic-primops >= 0.8 && < 0.9
175 , lockfree-queue >= 0.2.3 && < 0.3
177 -- transfomers
178 , exceptions >= 0.8 && < 0.11
179 , monad-control >= 1.0 && < 2
180 , mtl >= 2.2 && < 3
181 , transformers >= 0.4 && < 0.6
182 , transformers-base >= 0.4 && < 0.5
184 if impl(ghc < 8.0)
185 build-depends:
186 semigroups >= 0.18 && < 0.19
188-------------------------------------------------------------------------------
189-- Test suites
190-------------------------------------------------------------------------------
192test-suite test
193 type: exitcode-stdio-1.0
194 main-is: Main.hs
195 hs-source-dirs: test
196 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N
197 if flag(dev)
198 ghc-options: -Wmissed-specialisations
199 -Wall-missed-specialisations
200 if impl(ghc >= 8.0)
201 ghc-options: -Wcompat
202 -Wunrecognised-warning-flags
203 -Widentities
204 -Wincomplete-record-updates
205 -Wincomplete-uni-patterns
206 -Wredundant-constraints
207 -Wnoncanonical-monad-instances
208 -Wnoncanonical-monadfail-instances
209 build-depends:
210 streamly
211 , base >= 4.8 && < 5
212 , hspec >= 2.0 && < 3
213 , containers >= 0.5 && < 0.6
214 , transformers >= 0.4 && < 0.6
215 , mtl >= 2.2 && < 3
216 , exceptions >= 0.8 && < 0.11
217 default-language: Haskell2010
219test-suite properties
220 type: exitcode-stdio-1.0
221 main-is: Prop.hs
222 hs-source-dirs: test
223 ghc-options: -O0 -Wall -threaded -with-rtsopts=-N4
224 if flag(dev)
225 cpp-options: -DDEVBUILD
226 ghc-options: -Wmissed-specialisations
227 -Wall-missed-specialisations
228 if impl(ghc >= 8.0)
229 ghc-options: -Wcompat
230 -Wunrecognised-warning-flags
231 -Widentities
232 -Wincomplete-record-updates
233 -Wincomplete-uni-patterns
234 -Wredundant-constraints
235 -Wnoncanonical-monad-instances
236 -Wnoncanonical-monadfail-instances
237 build-depends:
238 streamly
239 , base >= 4.8 && < 5
240 , QuickCheck >= 2.10 && < 2.12
241 , hspec >= 2.0 && < 3
242 default-language: Haskell2010
244test-suite loops
245 type: exitcode-stdio-1.0
246 default-language: Haskell2010
247 main-is: loops.hs
248 hs-source-dirs: test
249 build-Depends:
250 streamly
251 , base >= 4.8 && < 5
253test-suite nested-loops
254 type: exitcode-stdio-1.0
255 default-language: Haskell2010
256 main-is: nested-loops.hs
257 hs-source-dirs: test
258 build-Depends:
259 streamly
260 , base >= 4.8 && < 5
261 , random >= 1.0.0 && < 1.2
263test-suite parallel-loops
264 type: exitcode-stdio-1.0
265 default-language: Haskell2010
266 main-is: parallel-loops.hs
267 hs-source-dirs: test
268 build-Depends:
269 streamly
270 , base >= 4.8 && < 5
271 , random >= 1.0.0 && < 1.2
273-------------------------------------------------------------------------------
274-- Benchmarks
275-------------------------------------------------------------------------------
277benchmark linear
278 type: exitcode-stdio-1.0
279 hs-source-dirs: benchmark
280 main-is: Linear.hs
281 other-modules: LinearOps
282 default-language: Haskell2010
283 ghc-options: -O2 -Wall
284 if flag(dev)
285 ghc-options: -Wmissed-specialisations
286 -Wall-missed-specialisations
287 -fno-ignore-asserts
288 if impl(ghc >= 8.0)
289 ghc-options: -Wcompat
290 -Wunrecognised-warning-flags
291 -Widentities
292 -Wincomplete-record-updates
293 -Wincomplete-uni-patterns
294 -Wredundant-constraints
295 -Wnoncanonical-monad-instances
296 -Wnoncanonical-monadfail-instances
297 build-depends:
298 streamly
299 , base >= 4.8 && < 5
300 , deepseq >= 1.4.0 && < 1.5
301 , random >= 1.0 && < 2.0
302 , gauge >= 0.2.3 && < 0.3
304benchmark nested
305 type: exitcode-stdio-1.0
306 hs-source-dirs: benchmark
307 main-is: Nested.hs
308 other-modules: NestedOps
309 default-language: Haskell2010
310 ghc-options: -O2 -Wall
311 if flag(dev)
312 ghc-options: -Wmissed-specialisations
313 -Wall-missed-specialisations
314 -fno-ignore-asserts
315 if impl(ghc >= 8.0)
316 ghc-options: -Wcompat
317 -Wunrecognised-warning-flags
318 -Widentities
319 -Wincomplete-record-updates
320 -Wincomplete-uni-patterns
321 -Wredundant-constraints
322 -Wnoncanonical-monad-instances
323 -Wnoncanonical-monadfail-instances
324 build-depends:
325 streamly
326 , base >= 4.8 && < 5
327 , deepseq >= 1.4.0 && < 1.5
328 , random >= 1.0 && < 2.0
329 , gauge >= 0.2.3 && < 0.3
331-------------------------------------------------------------------------------
332-- Internal benchmarks for unexposed modules
333-------------------------------------------------------------------------------
335-- We have to copy the streamly library modules here because there is no
336-- way to use unexposed modules from the library.
338benchmark base
339 type: exitcode-stdio-1.0
340 hs-source-dirs: benchmark, src
341 main-is: BaseStreams.hs
342 other-modules: Streamly.SVar
343 , Streamly.Streams.StreamK
344 , Streamly.Streams.StreamD
345 , Streamly.Streams.Prelude
347 , StreamDOps
348 , StreamKOps
350 default-language: Haskell2010
351 ghc-options: -O2 -Wall
352 if flag(dev)
353 ghc-options: -Wmissed-specialisations
354 -Wall-missed-specialisations
355 -fno-ignore-asserts
356 if impl(ghc >= 8.0)
357 ghc-options: -Wcompat
358 -Wunrecognised-warning-flags
359 -Widentities
360 -Wincomplete-record-updates
361 -Wincomplete-uni-patterns
362 -Wredundant-constraints
363 -Wnoncanonical-monad-instances
364 -Wnoncanonical-monadfail-instances
366 build-depends:
367 base >= 4.8 && < 5
368 , deepseq >= 1.4.0 && < 1.5
369 , random >= 1.0 && < 2.0
370 , gauge >= 0.2.3 && < 0.3
372 , ghc-prim >= 0.2 && < 0.6
373 , containers >= 0.5 && < 0.6
374 , heaps >= 0.3 && < 0.4
376 -- concurrency
377 , atomic-primops >= 0.8 && < 0.9
378 , lockfree-queue >= 0.2.3 && < 0.3
380 , exceptions >= 0.8 && < 0.11
381 , monad-control >= 1.0 && < 2
382 , mtl >= 2.2 && < 3
383 , transformers >= 0.4 && < 0.6
384 , transformers-base >= 0.4 && < 0.5
386 if impl(ghc < 8.0)
387 build-depends:
388 semigroups >= 0.18 && < 0.19
390executable chart-linear
391 default-language: Haskell2010
392 hs-source-dirs: benchmark
393 main-is: ChartLinear.hs
394 if flag(dev)
395 buildable: True
396 build-Depends:
397 base >= 4.8 && < 5
398 , bench-graph
399 , split
400 else
401 buildable: False
403executable chart-nested
404 default-language: Haskell2010
405 hs-source-dirs: benchmark
406 main-is: ChartNested.hs
407 if flag(dev)
408 buildable: True
409 build-Depends:
410 base >= 4.8 && < 5
411 , bench-graph
412 , split
413 else
414 buildable: False
416-------------------------------------------------------------------------------
417-- Examples
418-------------------------------------------------------------------------------
420executable SearchQuery
421 default-language: Haskell2010
422 main-is: SearchQuery.hs
423 hs-source-dirs: examples
424 if flag(examples) || flag(examples-sdl)
425 buildable: True
426 build-Depends:
427 streamly
428 , base >= 4.8 && < 5
429 , http-conduit >= 2.2.2 && < 2.4
430 else
431 buildable: False
433executable ListDir
434 default-language: Haskell2010
435 main-is: ListDir.hs
436 hs-source-dirs: examples
437 if flag(examples) || flag(examples-sdl)
438 buildable: True
439 build-Depends:
440 streamly
441 , base >= 4.8 && < 5
442 , path-io >= 0.1.0 && < 1.4
443 if impl(ghc < 8.0)
444 build-depends:
445 transformers >= 0.4 && < 0.6
446 else
447 buildable: False
449executable MergeSort
450 default-language: Haskell2010
451 main-is: MergeSort.hs
452 hs-source-dirs: examples
453 if flag(examples) || flag(examples-sdl)
454 buildable: True
455 build-Depends:
456 streamly
457 , base >= 4.8 && < 5
458 , random >= 1.0.0 && < 1.2
459 else
460 buildable: False
462executable AcidRain
463 default-language: Haskell2010
464 main-is: AcidRain.hs
465 hs-source-dirs: examples
466 if flag(examples) || flag(examples-sdl)
467 buildable: True
468 build-Depends:
469 streamly
470 , base >= 4.8 && < 5
471 , mtl >= 2.2 && < 3
472 if impl(ghc < 8.0)
473 build-depends:
474 semigroups >= 0.18 && < 0.19
475 , transformers >= 0.4 && < 0.6
476 else
477 buildable: False
479executable CirclingSquare
480 default-language: Haskell2010
481 main-is: CirclingSquare.hs
482 hs-source-dirs: examples
483 if flag(examples-sdl)
484 buildable: True
485 build-Depends:
486 streamly
487 , base >= 4.8 && < 5
488 , SDL >= 0.6.5 && < 0.7
489 else
490 buildable: False