on 09c955e help sign in
streamly/streamly.cabal
463 lines 15 kB history raw
1name: streamly
2version: 0.3.0
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 base
278 type: exitcode-stdio-1.0
279 hs-source-dirs: benchmark
280 main-is: BaseStreams.hs
281 other-modules: StreamDOps
282 , StreamKOps
283 default-language: Haskell2010
284 ghc-options: -O2 -Wall
285 if flag(dev)
286 ghc-options: -Wmissed-specialisations
287 -Wall-missed-specialisations
288 -fno-ignore-asserts
289 if impl(ghc >= 8.0)
290 ghc-options: -Wcompat
291 -Wunrecognised-warning-flags
292 -Widentities
293 -Wincomplete-record-updates
294 -Wincomplete-uni-patterns
295 -Wredundant-constraints
296 -Wnoncanonical-monad-instances
297 -Wnoncanonical-monadfail-instances
298 if flag(dev)
299 buildable: True
300 build-depends:
301 streamly
302 , base >= 4.8 && < 5
303 , deepseq >= 1.4.0 && < 1.5
304 , random >= 1.0 && < 2.0
305 , gauge >= 0.2.3 && < 0.3
306 else
307 buildable: False
309benchmark linear
310 type: exitcode-stdio-1.0
311 hs-source-dirs: benchmark
312 main-is: Linear.hs
313 other-modules: LinearOps
314 default-language: Haskell2010
315 ghc-options: -O2 -Wall
316 if flag(dev)
317 ghc-options: -Wmissed-specialisations
318 -Wall-missed-specialisations
319 -fno-ignore-asserts
320 if impl(ghc >= 8.0)
321 ghc-options: -Wcompat
322 -Wunrecognised-warning-flags
323 -Widentities
324 -Wincomplete-record-updates
325 -Wincomplete-uni-patterns
326 -Wredundant-constraints
327 -Wnoncanonical-monad-instances
328 -Wnoncanonical-monadfail-instances
329 build-depends:
330 streamly
331 , base >= 4.8 && < 5
332 , deepseq >= 1.4.0 && < 1.5
333 , random >= 1.0 && < 2.0
334 , gauge >= 0.2.3 && < 0.3
336benchmark nested
337 type: exitcode-stdio-1.0
338 hs-source-dirs: benchmark
339 main-is: Nested.hs
340 other-modules: NestedOps
341 default-language: Haskell2010
342 ghc-options: -O2 -Wall
343 if flag(dev)
344 ghc-options: -Wmissed-specialisations
345 -Wall-missed-specialisations
346 -fno-ignore-asserts
347 if impl(ghc >= 8.0)
348 ghc-options: -Wcompat
349 -Wunrecognised-warning-flags
350 -Widentities
351 -Wincomplete-record-updates
352 -Wincomplete-uni-patterns
353 -Wredundant-constraints
354 -Wnoncanonical-monad-instances
355 -Wnoncanonical-monadfail-instances
356 build-depends:
357 streamly
358 , base >= 4.8 && < 5
359 , deepseq >= 1.4.0 && < 1.5
360 , random >= 1.0 && < 2.0
361 , gauge >= 0.2.3 && < 0.3
363executable chart-linear
364 default-language: Haskell2010
365 hs-source-dirs: benchmark
366 main-is: ChartLinear.hs
367 if flag(dev)
368 buildable: True
369 build-Depends:
370 base >= 4.8 && < 5
371 , bench-graph
372 , split
373 else
374 buildable: False
376executable chart-nested
377 default-language: Haskell2010
378 hs-source-dirs: benchmark
379 main-is: ChartNested.hs
380 if flag(dev)
381 buildable: True
382 build-Depends:
383 base >= 4.8 && < 5
384 , bench-graph
385 , split
386 else
387 buildable: False
389-------------------------------------------------------------------------------
390-- Examples
391-------------------------------------------------------------------------------
393executable SearchQuery
394 default-language: Haskell2010
395 main-is: SearchQuery.hs
396 hs-source-dirs: examples
397 if flag(examples) || flag(examples-sdl)
398 buildable: True
399 build-Depends:
400 streamly
401 , base >= 4.8 && < 5
402 , http-conduit >= 2.2.2 && < 2.4
403 else
404 buildable: False
406executable ListDir
407 default-language: Haskell2010
408 main-is: ListDir.hs
409 hs-source-dirs: examples
410 if flag(examples) || flag(examples-sdl)
411 buildable: True
412 build-Depends:
413 streamly
414 , base >= 4.8 && < 5
415 , path-io >= 0.1.0 && < 1.4
416 if impl(ghc < 8.0)
417 build-depends:
418 transformers >= 0.4 && < 0.6
419 else
420 buildable: False
422executable MergeSort
423 default-language: Haskell2010
424 main-is: MergeSort.hs
425 hs-source-dirs: examples
426 if flag(examples) || flag(examples-sdl)
427 buildable: True
428 build-Depends:
429 streamly
430 , base >= 4.8 && < 5
431 , random >= 1.0.0 && < 1.2
432 else
433 buildable: False
435executable AcidRain
436 default-language: Haskell2010
437 main-is: AcidRain.hs
438 hs-source-dirs: examples
439 if flag(examples) || flag(examples-sdl)
440 buildable: True
441 build-Depends:
442 streamly
443 , base >= 4.8 && < 5
444 , mtl >= 2.2 && < 3
445 if impl(ghc < 8.0)
446 build-depends:
447 semigroups >= 0.18 && < 0.19
448 , transformers >= 0.4 && < 0.6
449 else
450 buildable: False
452executable CirclingSquare
453 default-language: Haskell2010
454 main-is: CirclingSquare.hs
455 hs-source-dirs: examples
456 if flag(examples-sdl)
457 buildable: True
458 build-Depends:
459 streamly
460 , base >= 4.8 && < 5
461 , SDL >= 0.6.5 && < 0.7
462 else
463 buildable: False