on 0ebc91c help sign in
streamly/streamly.cabal
559 lines 20 kB history raw
1cabal-version: 2.2
2name: streamly
3version: 0.10.0
4synopsis: Streaming, dataflow programming and declarative concurrency
5description:
6 For upgrading to streamly-0.9.0+ please read the
7 <https://github.com/composewell/streamly/blob/streamly-0.10.0/docs/User/Project/Upgrading-0.8-to-0.9.md Streamly-0.9.0 upgrade guide>.
8 .
9 Streamly is a standard library for Haskell that focuses on C-like
10 performance, modular combinators, and streaming data flow model.
11 Streamly consists of two packages, the
12 <https://hackage.haskell.org/package/streamly-core streamly-core> package
13 provides functionality that depends only on boot libraries, and
14 the <https://hackage.haskell.org/package/streamly streamly> package
15 provides additional functionality like concurrency, time, lifted
16 exceptions, and networking. For unified documentation visit
17 <https://streamly.composewell.com the streamly website>.
18 .
19 Streamly provides unified, modular building blocks to build
20 high-performance, concurrent, scalable applications in Haskell. Stream
21 fusion optimizations in streamly enable exceptional modularity with
22 high performance comparable to C. Streamly complements the Haskell
23 <https://hackage.haskell.org/package/base base> package, supplying
24 additional functionality to quickly build general-purpose applications
25 in Haskell. For high-level functionality built over streamly like
26 streaming OS processes, shell programming, GNU coreutils,
27 statistics, and compression libraries please see the
28 <https://streamly.composewell.com/ecosystem.html streamly ecosystem packages>.
29 .
30 Performance with modularity:
31 .
32 * Performance on par with C (<https://github.com/composewell/streaming-benchmarks Benchmarks>)
33 * API close to standard Haskell lists (<https://github.com/composewell/streamly-examples Examples>)
34 * Declarative concurrency with automatic scaling
35 * Filesystem, fsnotify, network, and Unicode support included
36 * Fast binary serialization (with optional JSON like features)
37 * More functionality is provided via many (<https://streamly.composewell.com/ecosystem.html ecosystem packages>)
38 .
39 Unified and powerful abstractions:
40 .
41 * Unifies streams, arrays, folds, and parsers
42 * Unifies @Data.List@, @list-t@, and @logict@ with streaming
43 * Unifies concurrency with standard streaming abstractions
44 * Unifies reactive, time-domain programming with streaming
45 * Unifies binary serialization and unboxed arrays
46 * Interworks with other streaming libraries
48homepage: https://streamly.composewell.com
49bug-reports: https://github.com/composewell/streamly/issues
50license: BSD-3-Clause
51license-file: LICENSE
52tested-with: GHC==8.6.5
53 , GHC==8.8.4
54 , GHC==8.10.7
55 , GHC==9.0.2
56 , GHC==9.2.8
57 , GHC==9.4.7
58 , GHC==9.6.3
59 , GHC==9.8.1
60author: Composewell Technologies
61maintainer: streamly@composewell.com
62copyright: 2017 Composewell Technologies
63category:
64 Streamly, Concurrency, Streaming, Dataflow, Pipes, Reactivity, List,
65 Logic, Non-determinism, Parsing, Array, Time, Unicode, Filesystem,
66 Network
67stability: Stable
68build-type: Configure
70extra-source-files:
71 benchmark/*.hs
72 benchmark/bench-runner/Main.hs
73 benchmark/bench-runner/bench-runner.cabal
74 benchmark/Streamly/Benchmark/Data/*.hs
75 benchmark/Streamly/Benchmark/Data/Serialize/*.hs
76 benchmark/Streamly/Benchmark/Data/Array/Common.hs
77 benchmark/Streamly/Benchmark/Data/Array/CommonImports.hs
78 benchmark/Streamly/Benchmark/Data/Array/Generic.hs
79 benchmark/Streamly/Benchmark/Data/Array/SmallArray.hs
80 benchmark/Streamly/Benchmark/Data/Array.hs
81 benchmark/Streamly/Benchmark/Data/Ring/Unboxed.hs
82 benchmark/Streamly/Benchmark/Data/MutArray.hs
83 benchmark/Streamly/Benchmark/Data/Array/Stream.hs
84 benchmark/Streamly/Benchmark/Data/Fold/Window.hs
85 benchmark/Streamly/Benchmark/Data/Stream/*.hs
86 benchmark/Streamly/Benchmark/FileSystem/*.hs
87 benchmark/Streamly/Benchmark/FileSystem/Handle/*.hs
88 benchmark/Streamly/Benchmark/Prelude/*.hs
89 benchmark/Streamly/Benchmark/Unicode/*.hs
90 benchmark/lib/Streamly/Benchmark/*.hs
91 benchmark/lib/Streamly/Benchmark/Common/*.hs
92 benchmark/streamly-benchmarks.cabal
93 bin/mk-hscope.sh
94 bin/mk-tags.sh
95 configure
96 configure.ac
97 docs/*.hs
98 docs/streamly-docs.cabal
99 targets/streamly-targets.cabal
100 targets/Targets.hs
101 test/test-runner/Main.hs
102 test/test-runner/test-runner.cabal
104 -- This is duplicated
105 src/Streamly/Internal/Data/Stream/Instances.hs
107 src/Streamly/Internal/FileSystem/Event/Darwin.h
108 src/assert.hs
109 src/config.h.in
110 src/inline.hs
111 test/Streamly/Test/Data/*.hs
112 test/Streamly/Test/Data/Array/CommonImports.hs
113 test/Streamly/Test/Data/Array/Common.hs
114 test/Streamly/Test/Data/Array/Generic.hs
115 test/Streamly/Test/Data/Array.hs
116 test/Streamly/Test/Data/MutArray.hs
117 test/Streamly/Test/Data/Ring/Unboxed.hs
118 test/Streamly/Test/Data/Array/Stream.hs
119 test/Streamly/Test/Data/Parser.hs
120 test/Streamly/Test/Data/ParserK.hs
121 test/Streamly/Test/Data/Stream/Concurrent.hs
122 test/Streamly/Test/FileSystem/Event.hs
123 test/Streamly/Test/FileSystem/Event/Common.hs
124 test/Streamly/Test/FileSystem/Event/Darwin.hs
125 test/Streamly/Test/FileSystem/Event/Windows.hs
126 test/Streamly/Test/FileSystem/Event/Linux.hs
127 test/Streamly/Test/FileSystem/Handle.hs
128 test/Streamly/Test/Network/Socket.hs
129 test/Streamly/Test/Network/Inet/TCP.hs
130 test/Streamly/Test/Prelude.hs
131 test/Streamly/Test/Prelude/*.hs
132 test/Streamly/Test/Unicode/*.hs
133 test/Streamly/Test/Serialize/*.hs
134 test/Streamly/Test/Data/Fold/*.hs
135 test/lib/Streamly/Test/Common.hs
136 test/lib/Streamly/Test/Prelude/Common.hs
137 test/streamly-tests.cabal
138 test/version-bounds.hs
139 test/Streamly/Test/Unicode/ucd/NormalizationTest.txt
140 test/Streamly/Test/Unicode/extra/NormalizationTest.txt
141 test/Streamly/Test/Data/Unbox.hs
142 test/Streamly/Test/Data/Unbox/*.hs
143 test/Streamly/Test/Data/Serialize.hs
144 test/Streamly/Test/Data/Serialize/*.hs
145 benchmark/Streamly/Benchmark/Unicode/data/AllChars.txt
146 benchmark/Streamly/Benchmark/Unicode/data/Devanagari.txt
147 benchmark/Streamly/Benchmark/Unicode/data/Japanese.txt
148 benchmark/Streamly/Benchmark/Unicode/data/Vietnamese.txt
149 benchmark/Streamly/Benchmark/Unicode/data/Deutsch.txt
150 benchmark/Streamly/Benchmark/Unicode/data/English.txt
151 benchmark/Streamly/Benchmark/Unicode/data/Korean.txt
153extra-doc-files:
154 CONTRIBUTING.md
155 CHANGELOG.md
156 README.md
157 benchmark/README.md
158 docs/*.md
159 docs/Developer/Benchmarks.md
160 docs/Developer/*.png
161 docs/Developer/*.md
162 docs/Developer/*.rst
163 docs/Developer/*.png
164 docs/Developer/*.md
165 docs/Developer/*.rst
166 docs/Developer/*.link
167 docs/User/*.md
168 docs/User/Tutorials/*.md
169 docs/User/Tutorials/*.link
170 docs/User/Tutorials/*.hs
171 docs/User/HowTo/*.md
172 docs/User/HowTo/*.link
173 docs/User/HowTo/*.svg
174 docs/User/Explanatory/*.md
175 docs/User/Explanatory/streaming-pradigms.rst
176 docs/User/Project/*.md
177 docs/User/Project/Upgrading-0.8-to-0.9.md
178 docs/User/Project/*.link
179 docs/User/Project/ApiChangelogs/0.8.3.txt
180 docs/User/Project/ApiChangelogs/0.8.3-0.9.0.txt
181 docs/User/Project/ApiChangelogs/0.9.0-0.10.0.txt
182 test/README.md
183 docs/Developer/Tests.md
185extra-tmp-files:
186 config.log
187 config.status
188 autom4te.cache
189 src/config.h
191source-repository head
192 type: git
193 location: https://github.com/composewell/streamly
195flag fusion-plugin
196 description: Use fusion plugin for benchmarks and executables
197 manual: True
198 default: False
200flag inspection
201 description: Enable inspection testing
202 manual: True
203 default: False
205flag debug
206 description: Debug build with asserts enabled
207 manual: True
208 default: False
210flag dev
211 description: Development build
212 manual: True
213 default: False
215flag has-llvm
216 description: Use llvm backend for code generation
217 manual: True
218 default: False
220flag opt
221 description: off=GHC default, on=-O2
222 manual: True
223 default: True
225flag limit-build-mem
226 description: Limits memory when building
227 manual: True
228 default: False
230flag use-unliftio
231 description: Use unliftio-core instead of monad-control
232 manual: True
233 default: False
235-------------------------------------------------------------------------------
236-- Common stanzas
237-------------------------------------------------------------------------------
239common compile-options
240 default-language: Haskell2010
242 if os(darwin)
243 cpp-options: -DCABAL_OS_DARWIN
245 if os(linux)
246 cpp-options: -DCABAL_OS_LINUX
248 if os(windows)
249 cpp-options: -DCABAL_OS_WINDOWS
251 if flag(dev)
252 cpp-options: -DDEVBUILD
254 if flag(inspection)
255 cpp-options: -DINSPECTION
257 ghc-options: -Weverything
258 -Wno-implicit-prelude
259 -Wno-missing-deriving-strategies
260 -Wno-missing-exported-signatures
261 -Wno-missing-import-lists
262 -Wno-missing-local-signatures
263 -Wno-missing-safe-haskell-mode
264 -Wno-missed-specialisations
265 -Wno-all-missed-specialisations
266 -Wno-monomorphism-restriction
267 -Wno-prepositive-qualified-module
268 -Wno-unsafe
269 -Rghc-timing
271 if impl(ghc >= 9.2)
272 ghc-options:
273 -Wno-missing-kind-signatures
274 -Wno-redundant-bang-patterns
275 -Wno-operator-whitespace
277 if impl(ghc >= 9.8)
278 ghc-options:
279 -Wno-missing-role-annotations
281 if flag(has-llvm)
282 ghc-options: -fllvm
284 if flag(dev)
285 ghc-options: -Wmissed-specialisations
286 -Wall-missed-specialisations
288 if flag(limit-build-mem)
289 ghc-options: +RTS -M1000M -RTS
291 if flag(use-unliftio)
292 cpp-options: -DUSE_UNLIFTIO
294common default-extensions
295 default-extensions:
296 BangPatterns
297 CApiFFI
298 CPP
299 ConstraintKinds
300 DeriveDataTypeable
301 DeriveGeneric
302 DeriveTraversable
303 ExistentialQuantification
304 FlexibleContexts
305 FlexibleInstances
306 GeneralizedNewtypeDeriving
307 InstanceSigs
308 KindSignatures
309 LambdaCase
310 MagicHash
311 MultiParamTypeClasses
312 PatternSynonyms
313 RankNTypes
314 RecordWildCards
315 ScopedTypeVariables
316 TupleSections
317 TypeApplications
318 TypeFamilies
319 TypeOperators
320 ViewPatterns
322 -- MonoLocalBinds, enabled by TypeFamilies, causes performance
323 -- regressions. Disable it. This must come after TypeFamilies,
324 -- otherwise TypeFamilies will enable it again.
325 NoMonoLocalBinds
327 -- UndecidableInstances -- Does not show any perf impact
328 -- UnboxedTuples -- interferes with (#.)
330common optimization-options
331 if flag(opt)
332 ghc-options: -O2
333 -fdicts-strict
334 -fspec-constr-recursive=16
335 -fmax-worker-args=16
337 -- For this to be effective it must come after the -O2 option
338 if flag(dev) || flag(debug) || !flag(opt)
339 ghc-options: -fno-ignore-asserts
340 cpp-options: -DDEBUG
342common threading-options
343 ghc-options: -threaded
344 -with-rtsopts=-N
346-- We need optimization options here to optimize internal (non-inlined)
347-- versions of functions. Also, we have some benchmarking inspection tests
348-- part of the library when built with --benchmarks flag. Thos tests fail
349-- if we do not use optimization options here. It was observed that due to
350-- -O2 here some concurrent/nested benchmarks improved and others regressed.
351-- We can investigate a bit more here why the regression occurred.
352common lib-options
353 import: compile-options, optimization-options, default-extensions
355-------------------------------------------------------------------------------
356-- Library
357-------------------------------------------------------------------------------
359library
360 import: lib-options
362 if impl(ghc >= 8.6)
363 default-extensions: QuantifiedConstraints
365 include-dirs:
366 src
367 , src/Streamly/Internal/Data/Stream
369 hs-source-dirs: src
370 exposed-modules:
371 -- Internal modules, listed roughly in bottom up
372 -- dependency order To view dependency graph:
373 -- graphmod | dot -Tps > deps.ps
374 Streamly.Internal.Data.IsMap.HashMap
375 , Streamly.Internal.Data.Cont
376 , Streamly.Internal.Data.Channel
377 , Streamly.Internal.Data.Stream.MkType
379 -- streamly-concurrent
380 , Streamly.Internal.Control.Concurrent
381 , Streamly.Internal.Control.ForkLifted
382 , Streamly.Internal.Data.Atomics
383 , Streamly.Internal.Data.IOFinalizer.Lifted
385 , Streamly.Internal.Data.Stream.Prelude
386 , Streamly.Internal.Data.Unfold.Prelude
387 , Streamly.Internal.Data.Fold.Prelude
389 -- streamly-unicode (depends on unicode-data)
390 , Streamly.Internal.Unicode.Utf8
391 , Streamly.Internal.Unicode.Char
393 -- streamly-network
394 , Streamly.Internal.Network.Socket
395 , Streamly.Internal.Network.Inet.TCP
397 -- Exposed modules
398 , Streamly.Data.Stream.MkType
399 , Streamly.Data.Stream.Prelude
400 , Streamly.Data.Fold.Prelude
402 -- Network/IO
403 , Streamly.Network.Socket
404 , Streamly.Network.Inet.TCP
406 -- Deprecated
407 , Streamly.Data.Array.Foreign
408 , Streamly.Data.Fold.Tee
409 , Streamly.Prelude
411 -- Deprecated Internal modules
412 , Streamly.Internal.Data.SVar
413 , Streamly.Internal.Data.Stream.SVar
415 , Streamly.Internal.Data.Stream.Serial
416 , Streamly.Internal.Data.Stream.Zip
417 , Streamly.Internal.Data.Stream.Async
418 , Streamly.Internal.Data.Stream.Parallel
419 , Streamly.Internal.Data.Stream.Ahead
420 , Streamly.Internal.Data.Stream.ZipAsync
422 , Streamly.Internal.Data.Stream.IsStream
424 if !impl(ghcjs) && flag(dev)
425 other-modules:
426 Streamly.Internal.System.IOVec.Type
427 , Streamly.Internal.System.IOVec
428 , Streamly.Internal.FileSystem.FDIO
429 , Streamly.Internal.FileSystem.FD
431 if flag(dev)
432 exposed-modules: Streamly.Internal.Data.SmallArray
433 -- Exposed modules show up on hackage irrespective of the flag, so keep
434 -- it hidden.
435 other-modules: Streamly.Data.SmallArray
436 , Streamly.Internal.Data.SmallArray.Type
438 if os(windows)
439 exposed-modules: Streamly.Internal.FileSystem.Event.Windows
441 if os(darwin)
442 include-dirs: src/Streamly/Internal
443 c-sources: src/Streamly/Internal/FileSystem/Event/Darwin.m
444 exposed-modules: Streamly.Internal.FileSystem.Event.Darwin
446 if os(linux)
447 exposed-modules: Streamly.Internal.FileSystem.Event.Linux
449 if os(linux) || os(darwin) || os(windows)
450 exposed-modules: Streamly.Internal.FileSystem.Event
452 other-modules:
453 Streamly.Internal.Data.Channel.Types
454 , Streamly.Internal.Data.Channel.Dispatcher
455 , Streamly.Internal.Data.Channel.Worker
457 , Streamly.Internal.Data.Stream.Concurrent.Channel.Type
458 , Streamly.Internal.Data.Stream.Concurrent.Channel.Dispatcher
459 , Streamly.Internal.Data.Stream.Concurrent.Channel.Consumer
460 , Streamly.Internal.Data.Stream.Concurrent.Channel.Append
461 , Streamly.Internal.Data.Stream.Concurrent.Channel.Interleave
462 , Streamly.Internal.Data.Stream.Concurrent.Channel.Operations
463 , Streamly.Internal.Data.Stream.Concurrent.Channel
464 , Streamly.Internal.Data.Stream.Concurrent
465 , Streamly.Internal.Data.Stream.Time
466 , Streamly.Internal.Data.Stream.Lifted
468 , Streamly.Internal.Data.Fold.Async
469 , Streamly.Internal.Data.Fold.Concurrent.Channel.Type
470 , Streamly.Internal.Data.Fold.Concurrent.Channel
471 , Streamly.Internal.Data.Fold.Concurrent
473 , Streamly.Internal.Data.Unfold.Exception
474 , Streamly.Internal.Data.Unfold.SVar
476 -- Deprecated
477 , Streamly.Internal.Data.Stream.Common
478 , Streamly.Internal.Data.Stream.IsStream.Type
479 , Streamly.Internal.Data.Stream.IsStream.Generate
480 , Streamly.Internal.Data.Stream.IsStream.Eliminate
481 , Streamly.Internal.Data.Stream.IsStream.Transform
482 , Streamly.Internal.Data.Stream.IsStream.Expand
483 , Streamly.Internal.Data.Stream.IsStream.Reduce
484 , Streamly.Internal.Data.Stream.IsStream.Exception
485 , Streamly.Internal.Data.Stream.IsStream.Lift
486 , Streamly.Internal.Data.Stream.IsStream.Top
487 , Streamly.Internal.Data.Stream.IsStream.Combinators
488 , Streamly.Internal.Data.Stream.IsStream.Common
489 , Streamly.Internal.Data.Stream.IsStream.Enumeration
491 , Streamly.Internal.Data.Stream.SVar.Generate
492 , Streamly.Internal.Data.Stream.SVar.Eliminate
494 , Streamly.Internal.Data.Fold.SVar
496 , Streamly.Internal.Data.SVar.Worker
497 , Streamly.Internal.Data.SVar.Dispatch
498 , Streamly.Internal.Data.SVar.Pull
500 build-depends:
501 -- Core libraries shipped with ghc, the min and max
502 -- constraints of these libraries should match with
503 -- the GHC versions we support. This is to make sure that
504 -- packages depending on the "ghc" package (packages
505 -- depending on doctest is a common example) can
506 -- depend on streamly.
507 base >= 4.12 && < 4.20
508 , containers >= 0.6.0 && < 0.8
509 , deepseq >= 1.4.4 && < 1.6
510 , exceptions >= 0.8.0 && < 0.11
511 , mtl >= 2.2.2 && < 2.4
512 , transformers >= 0.5.5 && < 0.7
513 , template-haskell >= 2.14 && < 2.22
515 -- The core streamly package
516 , streamly-core >= 0.2.0 && < 0.2.2
518 , hashable >= 1.3 && < 1.5
519 , unordered-containers >= 0.2 && < 0.3
520 , heaps >= 0.3 && < 0.5
522 -- concurrency
523 , atomic-primops >= 0.8 && < 0.9
524 , lockfree-queue >= 0.2.4 && < 0.3
526 , unicode-data >= 0.1 && < 0.5
528 -- Network
529 , network >= 2.6 && < 3.2
531 if impl(ghc < 9.6)
532 build-depends: transformers-base >= 0.4 && < 0.5
534 if flag(use-unliftio)
535 build-depends: unliftio-core >= 0.2 && < 0.3
536 else
537 build-depends: monad-control >= 1.0 && < 1.1
539 if flag(dev)
540 build-depends: primitive >= 0.5.4 && < 0.9
542 -- For FileSystem.Event module
543 if os(linux)
544 build-depends: directory >= 1.2.2 && < 1.4
546 if os(windows)
547 build-depends: Win32 >= 2.6 && < 2.14
549 if os(darwin)
550 build-depends: directory >= 1.2.2 && < 1.4
551 frameworks: Cocoa
553 if flag(inspection)
554 build-depends: inspection-testing >= 0.4 && < 0.6
556 -- Array uses a Storable constraint in dev build making several inspection
557 -- tests fail
558 if flag(dev) && flag(inspection)
559 build-depends: inspection-and-dev-flags-cannot-be-used-together