on ec19422 help sign in
streamly/streamly.cabal
555 lines 21 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: 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 benchmark/*.hs
110 benchmark/README.md
111 benchmark/Streamly/Benchmark/Data/*.hs
112 benchmark/Streamly/Benchmark/Data/Parser/*.hs
113 benchmark/Streamly/Benchmark/Data/Stream/*.hs
114 benchmark/Streamly/Benchmark/FileSystem/*.hs
115 benchmark/Streamly/Benchmark/FileSystem/Handle/*.hs
116 benchmark/Streamly/Benchmark/Prelude/*.hs
117 benchmark/Streamly/Benchmark/Prelude/Serial/*.hs
118 benchmark/Streamly/Benchmark/Unicode/*.hs
119 benchmark/lib/Streamly/Benchmark/*.hs
120 benchmark/lib/Streamly/Benchmark/Common/*.hs
121 benchmark/streamly-benchmarks.cabal
122 bin/bench.sh
123 bin/bench-exec-one.sh
124 bin/build-lib.sh
125 bin/mk-hscope.sh
126 bin/mk-tags.sh
127 bin/targets.sh
128 bin/test.sh
129 cabal.project
130 cabal.project.ci
131 charts-0/streamly-vs-list-time.svg
132 configure
133 configure.ac
134 credits/*.md
135 credits/Yampa-0.10.6.2.txt
136 credits/base-4.12.0.0.txt
137 credits/bjoern-2008-2009.txt
138 credits/clock-0.7.2.txt
139 credits/foldl-1.4.5.txt
140 credits/fsnotify-0.3.0.1.txt
141 credits/hfsevents-0.1.6.txt
142 credits/pipes-concurrency-2.0.8.txt
143 credits/primitive-0.7.0.0.txt
144 credits/transient-0.5.5.txt
145 credits/vector-0.12.0.2.txt
146 default.nix
147 design/*.md
148 design/*.png
149 design/*.rst
150 docs/Build.md
151 docs/streamly-vs-async.md
152 docs/streamly-vs-lists.md
153 docs/transformers.md
154 examples/README.md
155 src/Streamly/Internal/Data/Stream/Instances.hs
156 src/Streamly/Internal/Data/Time/config-clock.h
157 src/Streamly/Internal/Data/Array/PrimInclude.hs
158 src/Streamly/Internal/Data/Array/Prim/TypesInclude.hs
159 src/Streamly/Internal/Data/Array/Prim/MutTypesInclude.hs
160 src/Streamly/Internal/FileSystem/Event/Darwin.h
161 src/config.h.in
162 src/inline.hs
163 test/README.md
164 test/Streamly/Test/Common/Array.hs
165 test/Streamly/Test/Data/*.hs
166 test/Streamly/Test/Data/Array/Prim.hs
167 test/Streamly/Test/Data/Array/Prim/Pinned.hs
168 test/Streamly/Test/Data/Array/Storable/Foreign.hs
169 test/Streamly/Test/Data/Parser/ParserD.hs
170 test/Streamly/Test/FileSystem/Event.hs
171 test/Streamly/Test/FileSystem/Handle.hs
172 test/Streamly/Test/Network/Socket.hs
173 test/Streamly/Test/Network/Inet/TCP.hs
174 test/Streamly/Test/Prelude.hs
175 test/Streamly/Test/Prelude/*.hs
176 test/Streamly/Test/Unicode/Stream.hs
177 test/lib/Streamly/Test/Common.hs
178 test/lib/Streamly/Test/Prelude/Common.hs
179 test/streamly-tests.cabal
180 test/version-bounds.hs
181 stack.yaml
183extra-tmp-files:
184 config.log
185 config.status
186 autom4te.cache
187 src/config.h
189source-repository head
190 type: git
191 location: https://github.com/composewell/streamly
193flag fusion-plugin
194 description: Use fusion plugin for benchmarks and executables
195 manual: True
196 default: False
198flag inspection
199 description: Enable inspection testing
200 manual: True
201 default: False
203flag debug
204 description: Debug build with asserts enabled
205 manual: True
206 default: False
208flag dev
209 description: Development build
210 manual: True
211 default: False
213flag has-llvm
214 description: Use llvm backend for code generation
215 manual: True
216 default: False
218flag no-fusion
219 description: Disable rewrite rules for stream fusion
220 manual: True
221 default: False
223flag streamk
224 description: Use CPS style streams when possible
225 manual: True
226 default: False
228flag use-c-malloc
229 description: Use C malloc instead of GHC malloc
230 manual: True
231 default: False
233flag opt
234 description: off=GHC default, on=-O2
235 manual: True
236 default: True
238-------------------------------------------------------------------------------
239-- Common stanzas
240-------------------------------------------------------------------------------
242common compile-options
243 default-language: Haskell2010
245 if os(darwin)
246 cpp-options: -DCABAL_OS_DARWIN
248 if os(linux)
249 cpp-options: -DCABAL_OS_LINUX
251 if os(windows)
252 cpp-options: -DCABAL_OS_WINDOWS
254 if flag(streamk)
255 cpp-options: -DUSE_STREAMK_ONLY
257 if flag(no-fusion)
258 cpp-options: -DDISABLE_FUSION
260 if flag(dev)
261 cpp-options: -DDEVBUILD
263 if flag(inspection)
264 cpp-options: -DINSPECTION
266 if flag(use-c-malloc)
267 cpp-options: -DUSE_C_MALLOC
269 ghc-options: -Wall
270 -Wcompat
271 -Wunrecognised-warning-flags
272 -Widentities
273 -Wincomplete-record-updates
274 -Wincomplete-uni-patterns
275 -Wredundant-constraints
276 -Wnoncanonical-monad-instances
277 -Rghc-timing
279 if flag(has-llvm)
280 ghc-options: -fllvm
282 if flag(dev)
283 ghc-options: -Wmissed-specialisations
284 -Wall-missed-specialisations
286 if flag(dev) || flag(debug)
287 ghc-options: -fno-ignore-asserts
289common default-extensions
290 default-extensions:
291 BangPatterns
292 CApiFFI
293 CPP
294 ConstraintKinds
295 DeriveDataTypeable
296 DeriveGeneric
297 DeriveTraversable
298 ExistentialQuantification
299 FlexibleContexts
300 FlexibleInstances
301 GeneralizedNewtypeDeriving
302 InstanceSigs
303 KindSignatures
304 LambdaCase
305 MagicHash
306 MultiParamTypeClasses
307 PatternSynonyms
308 RankNTypes
309 RecordWildCards
310 ScopedTypeVariables
311 TupleSections
312 TypeFamilies
313 ViewPatterns
315 -- MonoLocalBinds, enabled by TypeFamilies, causes performance
316 -- regressions. Disable it. This must come after TypeFamilies,
317 -- otherwise TypeFamilies will enable it again.
318 NoMonoLocalBinds
320 -- UndecidableInstances -- Does not show any perf impact
321 -- UnboxedTuples -- interferes with (#.)
323common optimization-options
324 if flag(opt)
325 ghc-options: -O2
326 -fdicts-strict
327 -fspec-constr-recursive=16
328 -fmax-worker-args=16
330common threading-options
331 ghc-options: -threaded
332 -with-rtsopts=-N
334-- We need optimization options here to optimize internal (non-inlined)
335-- versions of functions. Also, we have some benchmarking inspection tests
336-- part of the library when built with --benchmarks flag. Thos tests fail
337-- if we do not use optimization options here. It was observed that due to
338-- -O2 here some concurrent/nested benchmarks improved and others regressed.
339-- We can investigate a bit more here why the regression occurred.
340common lib-options
341 import: compile-options, optimization-options, default-extensions
343-------------------------------------------------------------------------------
344-- Library
345-------------------------------------------------------------------------------
347library
348 import: lib-options
350 if impl(ghc >= 8.1)
351 default-extensions: TypeApplications
352 if impl(ghc >= 8.6)
353 default-extensions: QuantifiedConstraints
355 js-sources: jsbits/clock.js
356 include-dirs: src
357 if os(windows)
358 c-sources: src/Streamly/Internal/Data/Time/Windows.c
359 exposed-modules: Streamly.Internal.FileSystem.Event.Windows
360 build-depends: Win32 >= 2.6 && < 2.10
362 if os(darwin)
363 frameworks: Cocoa
364 include-dirs: src/Streamly/Internal
365 c-sources: src/Streamly/Internal/Data/Time/Darwin.c
366 , src/Streamly/Internal/FileSystem/Event/Darwin.m
367 exposed-modules:
368 Streamly.Internal.FileSystem.Event.Darwin
370 if os(linux)
371 exposed-modules: Streamly.Internal.FileSystem.Event.Linux
373 hs-source-dirs: src
374 other-modules:
375 Streamly.Data.Array
376 , Streamly.Data.Prim.Array
377 , Streamly.Data.SmallArray
379 -- Memory storage
380 , Streamly.Memory.Ring
382 , Streamly.FileSystem.IOVec
383 , Streamly.FileSystem.FDIO
384 , Streamly.FileSystem.FD
386 exposed-modules:
387 Streamly.Prelude
388 , Streamly
389 , Streamly.Data.Fold
390 , Streamly.Data.Unfold
392 -- Text Processing
393 , Streamly.Unicode.Stream
395 -- IO devices
396 , Streamly.Data.Array.Storable.Foreign
397 , Streamly.FileSystem.Handle
399 , Streamly.Tutorial
401 -- Internal modules
402 , Streamly.Internal.BaseCompat
403 , Streamly.Internal.Control.Exception
404 , Streamly.Internal.Control.Monad
405 , Streamly.Internal.Data.Cont
406 , Streamly.Internal.Data.Tuple.Strict
407 , Streamly.Internal.Data.Maybe.Strict
408 , Streamly.Internal.Data.Either.Strict
409 , Streamly.Internal.Data.Atomics
410 , Streamly.Internal.Data.Time
411 , Streamly.Internal.Data.Time.TimeSpec
412 , Streamly.Internal.Data.Time.Units
413 , Streamly.Internal.Data.Time.Clock
414 , Streamly.Internal.Data.SVar
416 -- Memory storage
417 , Streamly.Internal.Foreign.Malloc
419 -- Mutable data
420 , Streamly.Internal.Data.IORef.Prim
422 -- Arrays
423 , Streamly.Internal.Data.Array
424 , Streamly.Internal.Data.Array.Prim.Types
425 , Streamly.Internal.Data.Array.Prim
426 , Streamly.Internal.Data.Array.Prim.Mut.Types
427 , Streamly.Internal.Data.Array.Prim.Pinned.Types
428 , Streamly.Internal.Data.Array.Prim.Pinned
429 , Streamly.Internal.Data.Array.Prim.Pinned.Mut.Types
430 , Streamly.Internal.Data.SmallArray.Types
431 , Streamly.Internal.Data.SmallArray
432 , Streamly.Internal.Data.Array.Storable.Foreign.Mut.Types
433 , Streamly.Internal.Data.Array.Storable.Foreign.Types
434 , Streamly.Internal.Data.Array.Storable.Foreign
435 , Streamly.Internal.Memory.ArrayStream
437 -- Folds
438 , Streamly.Internal.Data.Fold.Types
439 , Streamly.Internal.Data.Fold
440 , Streamly.Internal.Data.Sink.Types
441 , Streamly.Internal.Data.Sink
443 -- Parsers
444 , Streamly.Internal.Data.Parser.ParserK.Types
445 , Streamly.Internal.Data.Parser.ParserD.Types
446 , Streamly.Internal.Data.Parser.ParserD.Tee
447 , Streamly.Internal.Data.Parser.ParserD
448 , Streamly.Internal.Data.Parser
450 -- Base streams
451 , Streamly.Internal.Data.Stream.StreamK.Type
452 , Streamly.Internal.Data.Stream.StreamK
453 , Streamly.Internal.Data.Stream.StreamD.Type
454 , Streamly.Internal.Data.Stream.StreamD.Generate
455 , Streamly.Internal.Data.Stream.StreamD.Eliminate
456 , Streamly.Internal.Data.Stream.StreamD.Nesting
457 , Streamly.Internal.Data.Stream.StreamD.Transform
458 , Streamly.Internal.Data.Stream.StreamD.Exception
459 , Streamly.Internal.Data.Stream.StreamD.Lift
460 , Streamly.Internal.Data.Stream.StreamD
461 , Streamly.Internal.Data.Stream.StreamDK.Type
462 , Streamly.Internal.Data.Stream.StreamDK
463 , Streamly.Internal.Data.Stream.Enumeration
464 , Streamly.Internal.Data.Stream.Prelude
466 -- Higher level streams
467 , Streamly.Internal.Data.Stream.SVar
468 , Streamly.Internal.Data.Stream.Serial
469 , Streamly.Internal.Data.Stream.Async
470 , Streamly.Internal.Data.Stream.Parallel
471 , Streamly.Internal.Data.Stream.Ahead
472 , Streamly.Internal.Data.Stream.Zip
473 , Streamly.Internal.Data.Stream.Combinators
474 , Streamly.Internal.Data.Stream.IsStream.Common
475 , Streamly.Internal.Data.Stream.IsStream.Generate
476 , Streamly.Internal.Data.Stream.IsStream.Eliminate
477 , Streamly.Internal.Data.Stream.IsStream.Transform
478 , Streamly.Internal.Data.Stream.IsStream.Nesting
479 , Streamly.Internal.Data.Stream.IsStream.Exception
480 , Streamly.Internal.Data.Stream.IsStream.Lift
481 , Streamly.Internal.Data.Stream.IsStream
482 , Streamly.Internal.Data.List
484 -- Unfolds
485 , Streamly.Internal.Data.Unfold.Types
486 , Streamly.Internal.Data.Unfold
488 -- Pipes
489 , Streamly.Internal.Data.Pipe.Types
490 , Streamly.Internal.Data.Pipe
492 -- Filesystem
493 , Streamly.Internal.FileSystem.Handle
494 , Streamly.Internal.FileSystem.Dir
495 , Streamly.Internal.FileSystem.File
497 -- Text Processing
498 , Streamly.Internal.Unicode.Stream
499 , Streamly.Internal.Unicode.Char
500 , Streamly.Internal.Unicode.Array.Char
501 , Streamly.Internal.Unicode.Array.Prim.Pinned
503 -- Serialization/deserialization in binary format
504 , Streamly.Internal.Data.Binary.Decode
506 -- Deprecated
507 , Streamly.Data.Unicode.Stream
508 , Streamly.Memory.Array
511 -- Network/Socket
512 , Streamly.Network.Socket
513 , Streamly.Network.Inet.TCP
515 , Streamly.Internal.Network.Socket
516 , Streamly.Internal.Network.Inet.TCP
518 build-depends:
519 -- Core libraries shipped with ghc, the min and max
520 -- constraints of these libraries should match with
521 -- the GHC versions we support
522 base >= 4.9 && < 5
523 , containers >= 0.5 && < 0.7
524 , deepseq >= 1.4.1 && < 1.5
525 , directory >= 1.2.2 && < 1.4
526 , exceptions >= 0.8 && < 0.11
527 , ghc-prim >= 0.2 && < 0.7
528 , mtl >= 2.2 && < 3
529 , primitive >= 0.5.4 && < 0.8
530 , transformers >= 0.4 && < 0.6
532 , heaps >= 0.3 && < 0.4
534 -- concurrency
535 , atomic-primops >= 0.8 && < 0.9
536 , lockfree-queue >= 0.2.3 && < 0.3
538 -- transfomers
539 , monad-control >= 1.0 && < 2
540 , transformers-base >= 0.4 && < 0.5
542 , fusion-plugin-types >= 0.1 && < 0.2
544 -- Network
545 , network >= 2.6 && < 4
548 if flag(inspection)
549 build-depends: template-haskell >= 2.14 && < 2.17
550 , inspection-testing >= 0.4 && < 0.5
552 -- Array uses a Storable constraint in dev build making several inspection
553 -- tests fail
554 if flag(dev) && flag(inspection)
555 build-depends: inspection-and-dev-flags-cannot-be-used-together