on 796bb22 help sign in
streamly/streamly.cabal
600 lines 23 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/: <https://github.com/composewell/streamly-examples Streamly Examples>
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: Composewell Technologies
90maintainer: streamly@composewell.com
91copyright: 2017 Composewell Technologies
92category: Control, Concurrency, Streaming, Reactivity
93stability: Experimental
94build-type: Custom
96extra-source-files:
97 .circleci/config.yml
98 .ghci
99 .github/workflows/haskell.yml
100 .gitignore
101 .hlint.ignore
102 .hlint.yaml
103 .travis.yml
104 CONTRIBUTING.md
105 Changelog.md
106 INSTALL.md
107 MAINTAINING.md
108 README.md
109 appveyor.yml
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/Streamly/Benchmark/Prelude/Serial/*.hs
119 benchmark/Streamly/Benchmark/Unicode/*.hs
120 benchmark/lib/Streamly/Benchmark/*.hs
121 benchmark/lib/Streamly/Benchmark/Common/*.hs
122 benchmark/streamly-benchmarks.cabal
123 bin/bench.sh
124 bin/bench-exec-one.sh
125 bin/build-lib.sh
126 bin/ghc.sh
127 bin/run-ci.sh
128 bin/mk-hscope.sh
129 bin/mk-tags.sh
130 bin/targets.sh
131 bin/test.sh
132 cabal.project
133 cabal.project.ci
134 charts-0/streamly-vs-list-time.svg
135 configure
136 configure.ac
137 credits/*.md
138 credits/Yampa-0.10.6.2.txt
139 credits/base-4.12.0.0.txt
140 credits/bjoern-2008-2009.txt
141 credits/clock-0.7.2.txt
142 credits/foldl-1.4.5.txt
143 credits/fsnotify-0.3.0.1.txt
144 credits/hfsevents-0.1.6.txt
145 credits/pipes-concurrency-2.0.8.txt
146 credits/primitive-0.7.0.0.txt
147 credits/transient-0.5.5.txt
148 credits/vector-0.12.0.2.txt
149 default.nix
150 design/*.md
151 design/*.png
152 design/*.rst
153 docs/Build.md
154 docs/streamly-vs-async.md
155 docs/streamly-vs-lists.md
156 docs/transformers.md
157 examples/README.md
158 src/Streamly/Internal/Data/Stream/Instances.hs
159 src/Streamly/Internal/Data/Time/Clock/config-clock.h
160 src/Streamly/Internal/Data/Array/PrimInclude.hs
161 src/Streamly/Internal/Data/Array/Prim/TypesInclude.hs
162 src/Streamly/Internal/Data/Array/Prim/MutTypesInclude.hs
163 src/Streamly/Internal/FileSystem/Event/Darwin.h
164 src/config.h.in
165 src/inline.hs
166 test/README.md
167 test/Streamly/Test/Common/Array.hs
168 test/Streamly/Test/Data/*.hs
169 test/Streamly/Test/Data/Array/Prim.hs
170 test/Streamly/Test/Data/Array/Prim/Pinned.hs
171 test/Streamly/Test/Data/Array/Foreign.hs
172 test/Streamly/Test/Data/Parser/ParserD.hs
173 test/Streamly/Test/FileSystem/Event.hs
174 test/Streamly/Test/FileSystem/Handle.hs
175 test/Streamly/Test/Network/Socket.hs
176 test/Streamly/Test/Network/Inet/TCP.hs
177 test/Streamly/Test/Prelude.hs
178 test/Streamly/Test/Prelude/*.hs
179 test/Streamly/Test/Unicode/Stream.hs
180 test/lib/Streamly/Test/Common.hs
181 test/lib/Streamly/Test/Prelude/Common.hs
182 test/streamly-tests.cabal
183 test/version-bounds.hs
184 stack.yaml
186extra-tmp-files:
187 config.log
188 config.status
189 autom4te.cache
190 src/config.h
192source-repository head
193 type: git
194 location: https://github.com/composewell/streamly
196flag fusion-plugin
197 description: Use fusion plugin for benchmarks and executables
198 manual: True
199 default: False
201flag inspection
202 description: Enable inspection testing
203 manual: True
204 default: False
206flag debug
207 description: Debug build with asserts enabled
208 manual: True
209 default: False
211flag dev
212 description: Development build
213 manual: True
214 default: False
216flag has-llvm
217 description: Use llvm backend for code generation
218 manual: True
219 default: False
221flag no-fusion
222 description: Disable rewrite rules for stream fusion
223 manual: True
224 default: False
226flag streamk
227 description: Use CPS style streams when possible
228 manual: True
229 default: False
231flag use-c-malloc
232 description: Use C malloc instead of GHC malloc
233 manual: True
234 default: False
236flag opt
237 description: off=GHC default, on=-O2
238 manual: True
239 default: True
241flag doctests
242 description: Build doctests test suite
243 manual: True
244 default: False
246custom-setup
247 setup-depends:
248 base >= 4 && <5,
249 cabal-doctest >= 1 && <1.1,
250 Cabal >= 2.2 && < 4
252-------------------------------------------------------------------------------
253-- Common stanzas
254-------------------------------------------------------------------------------
256common compile-options
257 default-language: Haskell2010
259 if os(darwin)
260 cpp-options: -DCABAL_OS_DARWIN
262 if os(linux)
263 cpp-options: -DCABAL_OS_LINUX
265 if os(windows)
266 cpp-options: -DCABAL_OS_WINDOWS
268 if flag(streamk)
269 cpp-options: -DUSE_STREAMK_ONLY
271 if flag(no-fusion)
272 cpp-options: -DDISABLE_FUSION
274 if flag(dev)
275 cpp-options: -DDEVBUILD
277 if flag(inspection)
278 cpp-options: -DINSPECTION
280 if flag(use-c-malloc)
281 cpp-options: -DUSE_C_MALLOC
283 ghc-options: -Wall
284 -Wcompat
285 -Wunrecognised-warning-flags
286 -Widentities
287 -Wincomplete-record-updates
288 -Wincomplete-uni-patterns
289 -Wredundant-constraints
290 -Wnoncanonical-monad-instances
291 -Rghc-timing
293 if flag(has-llvm)
294 ghc-options: -fllvm
296 if flag(dev)
297 ghc-options: -Wmissed-specialisations
298 -Wall-missed-specialisations
300 if flag(dev) || flag(debug)
301 ghc-options: -fno-ignore-asserts
303common default-extensions
304 default-extensions:
305 BangPatterns
306 CApiFFI
307 CPP
308 ConstraintKinds
309 DeriveDataTypeable
310 DeriveGeneric
311 DeriveTraversable
312 ExistentialQuantification
313 FlexibleContexts
314 FlexibleInstances
315 GeneralizedNewtypeDeriving
316 InstanceSigs
317 KindSignatures
318 LambdaCase
319 MagicHash
320 MultiParamTypeClasses
321 PatternSynonyms
322 RankNTypes
323 RecordWildCards
324 ScopedTypeVariables
325 TupleSections
326 TypeFamilies
327 ViewPatterns
329 -- MonoLocalBinds, enabled by TypeFamilies, causes performance
330 -- regressions. Disable it. This must come after TypeFamilies,
331 -- otherwise TypeFamilies will enable it again.
332 NoMonoLocalBinds
334 -- UndecidableInstances -- Does not show any perf impact
335 -- UnboxedTuples -- interferes with (#.)
337common optimization-options
338 if flag(opt)
339 ghc-options: -O2
340 -fdicts-strict
341 -fspec-constr-recursive=16
342 -fmax-worker-args=16
344common threading-options
345 ghc-options: -threaded
346 -with-rtsopts=-N
348-- We need optimization options here to optimize internal (non-inlined)
349-- versions of functions. Also, we have some benchmarking inspection tests
350-- part of the library when built with --benchmarks flag. Thos tests fail
351-- if we do not use optimization options here. It was observed that due to
352-- -O2 here some concurrent/nested benchmarks improved and others regressed.
353-- We can investigate a bit more here why the regression occurred.
354common lib-options
355 import: compile-options, optimization-options, default-extensions
357-------------------------------------------------------------------------------
358-- Library
359-------------------------------------------------------------------------------
361library
362 import: lib-options
364 if impl(ghc >= 8.1)
365 default-extensions: TypeApplications
366 if impl(ghc >= 8.6)
367 default-extensions: QuantifiedConstraints
369 js-sources: jsbits/clock.js
370 include-dirs: src
371 if os(windows)
372 c-sources: src/Streamly/Internal/Data/Time/Clock/Windows.c
373 exposed-modules: Streamly.Internal.FileSystem.Event.Windows
374 build-depends: Win32 >= 2.6 && < 2.10
376 if os(darwin)
377 frameworks: Cocoa
378 include-dirs: src/Streamly/Internal
379 c-sources: src/Streamly/Internal/Data/Time/Clock/Darwin.c
380 , src/Streamly/Internal/FileSystem/Event/Darwin.m
381 exposed-modules:
382 Streamly.Internal.FileSystem.Event.Darwin
384 if os(linux)
385 exposed-modules: Streamly.Internal.FileSystem.Event.Linux
387 hs-source-dirs: src
388 other-modules:
389 Streamly.Data.Array
390 , Streamly.Data.Prim.Array
391 , Streamly.Data.SmallArray
393 exposed-modules:
394 Streamly.Prelude
395 , Streamly.Data.Unfold
396 , Streamly.Data.Fold
397 , Streamly.Data.Array.Foreign
399 -- Text Processing
400 , Streamly.Unicode.Stream
402 -- Filesystem/IO
403 , Streamly.FileSystem.Handle
405 -- Network/IO
406 , Streamly.Network.Socket
407 , Streamly.Network.Inet.TCP
409 -- documentation
410 , Streamly.Tutorial
412 -- Deprecated
413 , Streamly
414 , Streamly.Data.Unicode.Stream
415 , Streamly.Memory.Array
417 -- Internal modules, listed roughly in dependency order
418 -- To view dependency graph:
419 -- graphmod | dot -Tps > deps.ps
421 -- streamly-base
422 , Streamly.Internal.BaseCompat
423 , Streamly.Internal.Control.Exception
424 , Streamly.Internal.Control.Monad
425 , Streamly.Internal.Control.Concurrent
426 , Streamly.Internal.Data.Cont
427 , Streamly.Internal.Data.Tuple.Strict
428 , Streamly.Internal.Data.Maybe.Strict
429 , Streamly.Internal.Data.Either.Strict
430 , Streamly.Internal.Foreign.Malloc
431 , Streamly.Internal.Data.Atomics
432 , Streamly.Internal.Data.IOFinalizer
433 , Streamly.Internal.Data.Time
434 , Streamly.Internal.Data.Time.TimeSpec
435 , Streamly.Internal.Data.Time.Units
436 , Streamly.Internal.Data.Time.Clock.Type
437 , Streamly.Internal.Data.Time.Clock
439 -- streamly-core-stream
440 , Streamly.Internal.Data.SVar
441 , Streamly.Internal.Data.Stream.StreamK.Type
442 , Streamly.Internal.Data.Fold.Type
443 , Streamly.Internal.Data.Stream.StreamD.Step
444 , Streamly.Internal.Data.Stream.StreamD.Type
445 , Streamly.Internal.Data.Stream.StreamDK.Type
446 , Streamly.Internal.Data.Unfold.Type
447 , Streamly.Internal.Data.Producer.Type
448 , Streamly.Internal.Data.Producer
449 , Streamly.Internal.Data.Producer.Source
450 , Streamly.Internal.Data.Sink.Type
451 , Streamly.Internal.Data.Parser.ParserK.Type
452 , Streamly.Internal.Data.Parser.ParserD.Type
453 , Streamly.Internal.Data.Pipe.Type
455 -- Unboxed IORef
456 , Streamly.Internal.Data.IORef.Prim
458 -- streamly-core-array
459 -- May depend on streamly-core-stream
460 , Streamly.Internal.Data.Array.Foreign.Mut.Type
461 , Streamly.Internal.Data.Array.Foreign.Type
462 , Streamly.Internal.Data.Array.Prim.Mut.Type
463 , Streamly.Internal.Data.Array.Prim.Type
464 , Streamly.Internal.Data.Array.Prim.Pinned.Mut.Type
465 , Streamly.Internal.Data.Array.Prim.Pinned.Type
466 , Streamly.Internal.Data.SmallArray.Type
468 -- streamly-base-streams
469 , Streamly.Internal.Data.Stream.StreamK
470 -- StreamD depends on streamly-core-array
471 , Streamly.Internal.Data.Stream.StreamD.Generate
472 , Streamly.Internal.Data.Stream.StreamD.Eliminate
473 , Streamly.Internal.Data.Stream.StreamD.Nesting
474 , Streamly.Internal.Data.Stream.StreamD.Transform
475 , Streamly.Internal.Data.Stream.StreamD.Exception
476 , Streamly.Internal.Data.Stream.StreamD.Lift
477 , Streamly.Internal.Data.Stream.StreamD
478 , Streamly.Internal.Data.Stream.StreamDK
479 , Streamly.Internal.Data.Stream.Prelude
481 , Streamly.Internal.Data.Parser.ParserD.Tee
482 , Streamly.Internal.Data.Parser.ParserD
484 -- streamly-core
485 , Streamly.Internal.Data.Unfold
486 , Streamly.Internal.Data.Fold.Tee
487 , Streamly.Internal.Data.Fold
488 , Streamly.Internal.Data.Sink
489 , Streamly.Internal.Data.Parser
490 , Streamly.Internal.Data.Pipe
492 , Streamly.Internal.Data.Stream.SVar
493 , Streamly.Internal.Data.Stream.Serial
494 , Streamly.Internal.Data.Stream.Async
495 , Streamly.Internal.Data.Stream.Parallel
496 , Streamly.Internal.Data.Stream.Ahead
497 , Streamly.Internal.Data.Stream.Zip
498 , Streamly.Internal.Data.Stream.IsStream.Combinators
499 , Streamly.Internal.Data.Stream.IsStream.Common
500 , Streamly.Internal.Data.Stream.IsStream.Types
501 , Streamly.Internal.Data.Stream.IsStream.Enumeration
502 , Streamly.Internal.Data.Stream.IsStream.Generate
503 , Streamly.Internal.Data.Stream.IsStream.Eliminate
504 , Streamly.Internal.Data.Stream.IsStream.Transform
505 , Streamly.Internal.Data.Stream.IsStream.Expand
506 , Streamly.Internal.Data.Stream.IsStream.Reduce
507 , Streamly.Internal.Data.Stream.IsStream.Exception
508 , Streamly.Internal.Data.Stream.IsStream.Lift
509 , Streamly.Internal.Data.Stream.IsStream.Top
510 , Streamly.Internal.Data.Stream.IsStream
511 , Streamly.Internal.Data.List
513 -- streamly-arrays
514 -- May depend on streamly-core
515 , Streamly.Internal.Data.Array
516 , Streamly.Internal.Data.Array.Foreign
517 , Streamly.Internal.Data.Array.Prim
518 , Streamly.Internal.Data.Array.Prim.Pinned
519 , Streamly.Internal.Data.SmallArray
520 , Streamly.Internal.Data.Array.Stream.Mut.Foreign
521 , Streamly.Internal.Data.Array.Stream.Foreign
523 -- Memory storage
524 , Streamly.Internal.Ring.Foreign
526 -- streamly-unicode
527 , Streamly.Internal.Unicode.Stream
528 , Streamly.Internal.Unicode.Char
529 , Streamly.Internal.Unicode.Array.Char
530 , Streamly.Internal.Unicode.Array.Prim.Pinned
532 -- streamly-serde
533 , Streamly.Internal.Data.Binary.Decode
535 -- streamly-filesystem
536 , Streamly.Internal.FileSystem.Handle
537 , Streamly.Internal.FileSystem.Dir
538 , Streamly.Internal.FileSystem.File
539 , Streamly.Internal.FileSystem.IOVec
540 , Streamly.Internal.FileSystem.FDIO
541 , Streamly.Internal.FileSystem.FD
543 -- streamly-network
544 , Streamly.Internal.Network.Socket
545 , Streamly.Internal.Network.Inet.TCP
547 build-depends:
548 -- Core libraries shipped with ghc, the min and max
549 -- constraints of these libraries should match with
550 -- the GHC versions we support
551 base >= 4.9 && < 5
552 , containers >= 0.5 && < 0.7
553 , deepseq >= 1.4.1 && < 1.5
554 , directory >= 1.2.2 && < 1.4
555 , exceptions >= 0.8 && < 0.11
556 , ghc-prim >= 0.2 && < 0.8
557 , mtl >= 2.2 && < 3
558 , primitive >= 0.5.4 && < 0.8
559 , transformers >= 0.4 && < 0.6
561 , heaps >= 0.3 && < 0.5
563 -- concurrency
564 , atomic-primops >= 0.8 && < 0.9
565 , lockfree-queue >= 0.2.3 && < 0.3
567 -- transfomers
568 , monad-control >= 1.0 && < 2
569 , transformers-base >= 0.4 && < 0.5
571 , fusion-plugin-types >= 0.1 && < 0.2
573 -- Network
574 , network >= 2.6 && < 4
577 if flag(inspection)
578 build-depends: template-haskell >= 2.14 && < 2.17
579 , inspection-testing >= 0.4 && < 0.5
581 -- Array uses a Storable constraint in dev build making several inspection
582 -- tests fail
583 if flag(dev) && flag(inspection)
584 build-depends: inspection-and-dev-flags-cannot-be-used-together
586test-suite doctests
587 type: exitcode-stdio-1.0
588 main-is: doctests.hs
589 if flag(doctests)
590 build-depends:
591 base
592 , base-compat >=0.10.5 && <0.12
593 , doctest >=0.15 && <0.18
594 , streamly
595 else
596 buildable: False
598 ghc-options: -Wall -threaded
599 hs-source-dirs: .
600 default-language: Haskell2010