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