mirror of
https://github.com/composewell/streamly.git
synced 2024-10-26 19:50:19 +03:00
1003 lines
32 KiB
Plaintext
1003 lines
32 KiB
Plaintext
name: streamly
|
||
version: 0.6.1
|
||
synopsis: Beautiful Streaming, Concurrent and Reactive Composition
|
||
description:
|
||
Streamly, short for streaming concurrently, provides monadic streams, with a
|
||
simple API, almost identical to standard lists, and an in-built support for
|
||
concurrency. Streams can be generated, merged, chained, mapped, zipped, and
|
||
consumed concurrently – providing a generalized high level programming
|
||
framework unifying streaming and concurrency. Controlled concurrency allows
|
||
even infinite streams to be evaluated concurrently. Concurrency is auto
|
||
scaled based on feedback from the stream consumer. Programmer does not
|
||
have to be aware of threads, locking or synchronization to write scalable
|
||
concurrent programs.
|
||
.
|
||
In addition to the basic streaming functionality provided by
|
||
streaming libraries like
|
||
<https://hackage.haskell.org/package/streaming streaming>,
|
||
<https://hackage.haskell.org/package/pipes pipes>, and
|
||
<https://hackage.haskell.org/package/conduit conduit> streamly provides
|
||
advanced stream composition including various ways of appending, merging,
|
||
zipping, splitting, grouping, distributing, partitioning and unzipping of
|
||
streams with true streaming and with concurrency. Streamly subsumes the
|
||
functionality of list transformer libraries like @pipes@ or
|
||
<https://hackage.haskell.org/package/list-t list-t> and also the logic
|
||
programming library <https://hackage.haskell.org/package/logict logict>. On
|
||
the concurrency side, it subsumes the basic concurrency functionality
|
||
provided by the <https://hackage.haskell.org/package/async async> package and
|
||
provides much more powerful high level concurrent streaming composition.
|
||
Because it supports streaming with concurrency we can write FRP applications
|
||
similar in concept to <https://hackage.haskell.org/package/Yampa Yampa> or
|
||
<https://hackage.haskell.org/package/reflex reflex>.
|
||
.
|
||
The grouping, splitting and windowing combinators in streamly can substitute
|
||
the window operators in <https://flink.apache.org/ Apache Flink>. However,
|
||
compared to Flink streamly has a pure functional, succinct and expressive API
|
||
that is applicable to full spectrum of applications, from a "hello world"
|
||
application to large scale concurrent applications, with equal efficiency.
|
||
For those familiar with <http://reactivex.io/ Reactive Extensions>, streamly
|
||
has similarities with the RxJs API. For most RxJs combinators you
|
||
can find corresponding combinators in streamly.
|
||
.
|
||
Streamly focuses on practical engineering with high performance. From well
|
||
written streamly programs one can expect performance competitive to C. High
|
||
performance streaming eliminates the need for string and text libraries like
|
||
<https://hackage.haskell.org/package/bytestring bytestring>,
|
||
<https://hackage.haskell.org/package/text text> and their lazy and strict
|
||
flavors. All the confusion and cognitive overhead arising from different
|
||
string types is eliminated. The only basic types are arrays for storage and
|
||
streams for processing. Strings and text are simply streams of 'Char' as they
|
||
should be. Even Haskell lists can be replaced by pure streams. Arrays
|
||
provided by streamly have performance at par with the vector library.
|
||
.
|
||
Streamly interoperates with popular Haskell streaming libraries, see
|
||
the interoperation section in "Streamly.Tutorial".
|
||
.
|
||
Why use streamly?
|
||
.
|
||
* /Simplicity/: Simple list like streaming API, if you know how to use lists
|
||
then you know how to use streamly. This library is built with simplicity
|
||
and ease of use as a primary design goal.
|
||
* /Concurrency/: Simple, powerful, and scalable concurrency. Concurrency is
|
||
built-in, and not intrusive, concurrent programs are written exactly the
|
||
same way as non-concurrent ones.
|
||
* /Generality/: Unifies functionality provided by several disparate packages
|
||
(streaming, concurrency, list transformer, logic programming, reactive
|
||
programming) in a concise API.
|
||
* /Performance/: Streamly is designed for high performance.
|
||
It employs stream fusion optimizations for best possible performance.
|
||
Serial peformance is equivalent to the venerable `vector` library in most
|
||
cases and even better in some cases. Concurrent performance is unbeatable.
|
||
See
|
||
<https://github.com/composewell/streaming-benchmarks streaming-benchmarks>
|
||
for a comparison of popular streaming libraries on micro-benchmarks.
|
||
.
|
||
Where to find more information:
|
||
.
|
||
* /Quick Overview/: <src/README.md README file> in the package
|
||
* /Detailed Tutorial/: "Streamly.Tutorial" module in the haddock documentation
|
||
* /Reference Documentation/: Haddock documentation for the respective modules
|
||
* /Examples/: <src/examples examples directory> in the package
|
||
* /Guides/: <src/docs docs directory> in the package, for documentation on
|
||
advanced topics, limitations, semantics of the library or on specific use
|
||
cases.
|
||
* <https://github.com/composewell/streaming-benchmarks Streaming Benchmarks>
|
||
* <https://github.com/composewell/concurrency-benchmarks Concurrency Benchmarks>
|
||
|
||
homepage: https://github.com/composewell/streamly
|
||
bug-reports: https://github.com/composewell/streamly/issues
|
||
license: BSD3
|
||
license-file: LICENSE
|
||
tested-with: GHC==7.10.3
|
||
, GHC==8.0.2
|
||
, GHC==8.4.4
|
||
, GHC==8.6.4
|
||
author: Harendra Kumar
|
||
maintainer: harendra.kumar@gmail.com
|
||
copyright: 2017 Harendra Kumar
|
||
category: Control, Concurrency, Streaming, Reactivity
|
||
stability: Experimental
|
||
build-type: Configure
|
||
cabal-version: >= 1.10
|
||
|
||
extra-source-files:
|
||
Changelog.md
|
||
README.md
|
||
docs/streamly-vs-async.md
|
||
docs/transformers.md
|
||
bench.sh
|
||
stack-7.10.yaml
|
||
stack-8.0.yaml
|
||
stack.yaml
|
||
src/Streamly/Streams/Instances.hs
|
||
src/Streamly/Streams/inline.hs
|
||
configure.ac
|
||
configure
|
||
src/Streamly/Time/config.h.in
|
||
|
||
extra-tmp-files:
|
||
config.log
|
||
config.status
|
||
autom4te.cache
|
||
src/Streamly/Time/config.h
|
||
|
||
source-repository head
|
||
type: git
|
||
location: https://github.com/composewell/streamly
|
||
|
||
flag dev
|
||
description: Development build
|
||
manual: True
|
||
default: False
|
||
|
||
flag has-llvm
|
||
description: Use llvm backend for better performance
|
||
manual: True
|
||
default: False
|
||
|
||
flag no-charts
|
||
description: Disable chart generation
|
||
manual: True
|
||
default: False
|
||
|
||
flag no-fusion
|
||
description: Disable rewrite rules
|
||
manual: True
|
||
default: False
|
||
|
||
flag streamk
|
||
description: Use CPS style streams when possible
|
||
manual: True
|
||
default: False
|
||
|
||
flag examples
|
||
description: Build including examples
|
||
manual: True
|
||
default: False
|
||
|
||
flag examples-sdl
|
||
description: Build including SDL examples
|
||
manual: True
|
||
default: False
|
||
|
||
-------------------------------------------------------------------------------
|
||
-- Library
|
||
-------------------------------------------------------------------------------
|
||
|
||
library
|
||
js-sources: jsbits/clock.js
|
||
include-dirs: src/Streamly/Time
|
||
, src/Streamly/Streams
|
||
if os(windows)
|
||
c-sources: src/Streamly/Time/Windows.c
|
||
if os(darwin)
|
||
c-sources: src/Streamly/Time/Darwin.c
|
||
hs-source-dirs: src
|
||
other-modules: Streamly.Atomics
|
||
, Streamly.SVar
|
||
, Streamly.Strict
|
||
, Streamly.Enumeration
|
||
|
||
-- Memory storage
|
||
, Streamly.Mem.Array.Types
|
||
, Streamly.Mem.Ring
|
||
|
||
-- Base streams
|
||
, Streamly.Streams.StreamK.Type
|
||
, Streamly.Streams.StreamK
|
||
, Streamly.Streams.StreamD.Type
|
||
, Streamly.Streams.StreamD
|
||
, Streamly.Streams.Prelude
|
||
|
||
-- Higher level streams
|
||
, Streamly.Streams.SVar
|
||
, Streamly.Streams.Serial
|
||
, Streamly.Streams.Async
|
||
, Streamly.Streams.Parallel
|
||
, Streamly.Streams.Ahead
|
||
, Streamly.Streams.Zip
|
||
, Streamly.Streams.Combinators
|
||
|
||
-- Pure streams
|
||
, Streamly.List
|
||
|
||
-- Folds
|
||
, Streamly.Fold.Types
|
||
, Streamly.Sink.Types
|
||
, Streamly.Sink
|
||
, Streamly.Pipe.Types
|
||
|
||
exposed-modules: Streamly.Prelude
|
||
, Streamly.Time
|
||
, Streamly
|
||
, Streamly.Fold
|
||
, Streamly.Pipe
|
||
|
||
, Streamly.String
|
||
|
||
-- IO devices
|
||
, Streamly.Mem.Array
|
||
, Streamly.FileSystem.File
|
||
, Streamly.FileSystem.Handle
|
||
, Streamly.Network.Socket
|
||
, Streamly.Network.Server
|
||
, Streamly.Network.Client
|
||
|
||
-- Time
|
||
, Streamly.Time.Units
|
||
, Streamly.Time.Clock
|
||
|
||
, Streamly.Tutorial
|
||
, Streamly.Internal
|
||
|
||
default-language: Haskell2010
|
||
ghc-options: -Wall -fspec-constr-recursive=10
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(streamk)
|
||
cpp-options: -DUSE_STREAMK_ONLY
|
||
|
||
if flag(no-fusion)
|
||
cpp-options: -DDISABLE_FUSION
|
||
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
|
||
build-depends: base >= 4.8 && < 5
|
||
, ghc-prim >= 0.2 && < 0.6
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, containers >= 0.5 && < 0.7
|
||
, heaps >= 0.3 && < 0.4
|
||
|
||
-- concurrency
|
||
, atomic-primops >= 0.8 && < 0.9
|
||
, lockfree-queue >= 0.2.3 && < 0.3
|
||
|
||
-- transfomers
|
||
, exceptions >= 0.8 && < 0.11
|
||
, monad-control >= 1.0 && < 2
|
||
, mtl >= 2.2 && < 3
|
||
, transformers >= 0.4 && < 0.6
|
||
, transformers-base >= 0.4 && < 0.5
|
||
, network >= 2.6 && < 4
|
||
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
semigroups >= 0.18 && < 0.19
|
||
|
||
-------------------------------------------------------------------------------
|
||
-- Test suites
|
||
-------------------------------------------------------------------------------
|
||
|
||
-- Compilation for coverage builds on CI machines takes too long without -O0
|
||
|
||
test-suite test
|
||
type: exitcode-stdio-1.0
|
||
main-is: Main.hs
|
||
js-sources: jsbits/clock.js
|
||
hs-source-dirs: test
|
||
ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, hspec >= 2.0 && < 3
|
||
, containers >= 0.5 && < 0.7
|
||
, transformers >= 0.4 && < 0.6
|
||
, mtl >= 2.2 && < 3
|
||
, exceptions >= 0.8 && < 0.11
|
||
default-language: Haskell2010
|
||
|
||
-- test-suite pure-streams-base
|
||
-- type: exitcode-stdio-1.0
|
||
-- main-is: PureStreams.hs
|
||
-- hs-source-dirs: test
|
||
-- ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
|
||
-- if flag(dev)
|
||
-- cpp-options: -DDEVBUILD
|
||
-- ghc-options: -Wmissed-specialisations
|
||
-- -Wall-missed-specialisations
|
||
-- if impl(ghc >= 8.0)
|
||
-- ghc-options: -Wcompat
|
||
-- -Wunrecognised-warning-flags
|
||
-- -Widentities
|
||
-- -Wincomplete-record-updates
|
||
-- -Wincomplete-uni-patterns
|
||
-- -Wredundant-constraints
|
||
-- -Wnoncanonical-monad-instances
|
||
-- -Wnoncanonical-monadfail-instances
|
||
-- build-depends:
|
||
-- streamly
|
||
-- , base >= 4.8 && < 5
|
||
-- , hspec >= 2.0 && < 3
|
||
-- default-language: Haskell2010
|
||
--
|
||
-- test-suite pure-streams-streamly
|
||
-- type: exitcode-stdio-1.0
|
||
-- main-is: PureStreams.hs
|
||
-- hs-source-dirs: test
|
||
-- cpp-options: -DUSE_STREAMLY_LIST
|
||
-- ghc-options: -O0 -Wall -threaded -with-rtsopts=-N -fno-ignore-asserts
|
||
-- if flag(dev)
|
||
-- cpp-options: -DDEVBUILD
|
||
-- ghc-options: -Wmissed-specialisations
|
||
-- -Wall-missed-specialisations
|
||
-- if impl(ghc >= 8.0)
|
||
-- ghc-options: -Wcompat
|
||
-- -Wunrecognised-warning-flags
|
||
-- -Widentities
|
||
-- -Wincomplete-record-updates
|
||
-- -Wincomplete-uni-patterns
|
||
-- -Wredundant-constraints
|
||
-- -Wnoncanonical-monad-instances
|
||
-- -Wnoncanonical-monadfail-instances
|
||
-- build-depends:
|
||
-- streamly
|
||
-- , base >= 4.8 && < 5
|
||
-- , hspec >= 2.0 && < 3
|
||
-- default-language: Haskell2010
|
||
|
||
test-suite properties
|
||
type: exitcode-stdio-1.0
|
||
main-is: Prop.hs
|
||
js-sources: jsbits/clock.js
|
||
hs-source-dirs: test
|
||
ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, QuickCheck >= 2.10 && < 2.14
|
||
, hspec >= 2.0 && < 3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
default-language: Haskell2010
|
||
|
||
test-suite array-test
|
||
type: exitcode-stdio-1.0
|
||
main-is: Arrays.hs
|
||
js-sources: jsbits/clock.js
|
||
hs-source-dirs: test
|
||
ghc-options: -fno-ignore-asserts -Wall -O0 -threaded -with-rtsopts=-N
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, QuickCheck >= 2.10 && < 2.14
|
||
, hspec >= 2.0 && < 3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
default-language: Haskell2010
|
||
|
||
test-suite maxrate
|
||
type: exitcode-stdio-1.0
|
||
default-language: Haskell2010
|
||
main-is: MaxRate.hs
|
||
js-sources: jsbits/clock.js
|
||
hs-source-dirs: test
|
||
ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
|
||
if flag(dev)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, clock >= 0.7.1 && < 0.8
|
||
, hspec >= 2.0 && < 3
|
||
, random >= 1.0.0 && < 2
|
||
else
|
||
buildable: False
|
||
|
||
test-suite loops
|
||
type: exitcode-stdio-1.0
|
||
default-language: Haskell2010
|
||
main-is: loops.hs
|
||
hs-source-dirs: test
|
||
ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
|
||
test-suite nested-loops
|
||
type: exitcode-stdio-1.0
|
||
default-language: Haskell2010
|
||
main-is: nested-loops.hs
|
||
hs-source-dirs: test
|
||
ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, random >= 1.0.0 && < 2
|
||
|
||
test-suite parallel-loops
|
||
type: exitcode-stdio-1.0
|
||
default-language: Haskell2010
|
||
main-is: parallel-loops.hs
|
||
hs-source-dirs: test
|
||
ghc-options: -fno-ignore-asserts -O2 -Wall -threaded -with-rtsopts=-N
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, random >= 1.0.0 && < 2
|
||
|
||
-------------------------------------------------------------------------------
|
||
-- Benchmarks
|
||
-------------------------------------------------------------------------------
|
||
|
||
benchmark linear
|
||
type: exitcode-stdio-1.0
|
||
hs-source-dirs: benchmark
|
||
main-is: Linear.hs
|
||
other-modules: LinearOps
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -with-rtsopts "-T" -fspec-constr-recursive=10
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, random >= 1.0 && < 2.0
|
||
, gauge >= 0.2.4 && < 0.3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
|
||
benchmark linear-async
|
||
type: exitcode-stdio-1.0
|
||
hs-source-dirs: benchmark
|
||
main-is: LinearAsync.hs
|
||
other-modules: LinearOps
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
cpp-options: -DLINEAR_ASYNC
|
||
if flag(dev)
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, random >= 1.0 && < 2.0
|
||
, gauge >= 0.2.4 && < 0.3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
|
||
benchmark linear-rate
|
||
type: exitcode-stdio-1.0
|
||
hs-source-dirs: benchmark
|
||
main-is: LinearRate.hs
|
||
other-modules: LinearOps
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, random >= 1.0 && < 2.0
|
||
, gauge >= 0.2.4 && < 0.3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
|
||
benchmark nested
|
||
type: exitcode-stdio-1.0
|
||
hs-source-dirs: benchmark
|
||
main-is: Nested.hs
|
||
other-modules: NestedOps
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, random >= 1.0 && < 2.0
|
||
, gauge >= 0.2.4 && < 0.3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
|
||
benchmark array
|
||
type: exitcode-stdio-1.0
|
||
hs-source-dirs: benchmark
|
||
main-is: Array.hs
|
||
other-modules: ArrayOps
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -with-rtsopts "-T" -fspec-constr-recursive=10
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, random >= 1.0 && < 2.0
|
||
, gauge >= 0.2.4 && < 0.3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
|
||
benchmark fileio
|
||
type: exitcode-stdio-1.0
|
||
hs-source-dirs: benchmark
|
||
main-is: FileIO.hs
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
cpp-options: -DDEVBUILD
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, gauge >= 0.2.4 && < 0.3
|
||
, typed-process >= 0.2.3 && < 0.3
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
|
||
-------------------------------------------------------------------------------
|
||
-- Internal benchmarks for unexposed modules
|
||
-------------------------------------------------------------------------------
|
||
|
||
-- We have to copy the streamly library modules here because there is no
|
||
-- way to use unexposed modules from the library.
|
||
|
||
benchmark base
|
||
type: exitcode-stdio-1.0
|
||
include-dirs: src/Streamly/Time
|
||
, src/Streamly/Streams
|
||
if os(windows)
|
||
c-sources: src/Streamly/Time/Windows.c
|
||
if os(darwin)
|
||
c-sources: src/Streamly/Time/Darwin.c
|
||
hs-source-dirs: benchmark, src
|
||
main-is: BaseStreams.hs
|
||
other-modules: Streamly.Atomics
|
||
, Streamly.Time.Units
|
||
, Streamly.Time.Clock
|
||
, Streamly.SVar
|
||
, Streamly.Streams.StreamK.Type
|
||
, Streamly.Streams.StreamK
|
||
, Streamly.Streams.StreamD.Type
|
||
, Streamly.Streams.StreamD
|
||
, Streamly.Streams.Prelude
|
||
|
||
, StreamDOps
|
||
, StreamKOps
|
||
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -fspec-constr-recursive=10 -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
ghc-options: -Wmissed-specialisations
|
||
-Wall-missed-specialisations
|
||
-fno-ignore-asserts
|
||
if impl(ghc >= 8.0)
|
||
ghc-options: -Wcompat
|
||
-Wunrecognised-warning-flags
|
||
-Widentities
|
||
-Wincomplete-record-updates
|
||
-Wincomplete-uni-patterns
|
||
-Wredundant-constraints
|
||
-Wnoncanonical-monad-instances
|
||
-Wnoncanonical-monadfail-instances
|
||
|
||
if flag(dev)
|
||
buildable: True
|
||
build-depends:
|
||
base >= 4.8 && < 5
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, random >= 1.0 && < 2.0
|
||
, gauge >= 0.2.4 && < 0.3
|
||
|
||
, ghc-prim >= 0.2 && < 0.6
|
||
, containers >= 0.5 && < 0.7
|
||
, heaps >= 0.3 && < 0.4
|
||
|
||
-- concurrency
|
||
, atomic-primops >= 0.8 && < 0.9
|
||
, lockfree-queue >= 0.2.3 && < 0.3
|
||
|
||
, exceptions >= 0.8 && < 0.11
|
||
, monad-control >= 1.0 && < 2
|
||
, mtl >= 2.2 && < 3
|
||
, transformers >= 0.4 && < 0.6
|
||
, transformers-base >= 0.4 && < 0.5
|
||
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
semigroups >= 0.18 && < 0.19
|
||
else
|
||
buildable: False
|
||
|
||
executable nano-bench
|
||
hs-source-dirs: benchmark, src
|
||
include-dirs: src/Streamly/Time
|
||
, src/Streamly/Streams
|
||
if os(windows)
|
||
c-sources: src/Streamly/Time/Windows.c
|
||
if os(darwin)
|
||
c-sources: src/Streamly/Time/Darwin.c
|
||
main-is: NanoBenchmarks.hs
|
||
other-modules: Streamly.Atomics
|
||
, Streamly.Time.Units
|
||
, Streamly.Time.Clock
|
||
, Streamly.SVar
|
||
, Streamly.Streams.StreamK.Type
|
||
, Streamly.Streams.StreamK
|
||
, Streamly.Streams.StreamD.Type
|
||
, Streamly.Streams.StreamD
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
buildable: True
|
||
build-depends:
|
||
base >= 4.8 && < 5
|
||
, gauge >= 0.2.4 && < 0.3
|
||
, ghc-prim >= 0.2 && < 0.6
|
||
, containers >= 0.5 && < 0.7
|
||
, deepseq >= 1.4.3 && < 1.5
|
||
, heaps >= 0.3 && < 0.4
|
||
, random >= 1.0 && < 2.0
|
||
|
||
-- concurrency
|
||
, atomic-primops >= 0.8 && < 0.9
|
||
, lockfree-queue >= 0.2.3 && < 0.3
|
||
|
||
, exceptions >= 0.8 && < 0.11
|
||
, monad-control >= 1.0 && < 2
|
||
, mtl >= 2.2 && < 3
|
||
, transformers >= 0.4 && < 0.6
|
||
, transformers-base >= 0.4 && < 0.5
|
||
else
|
||
buildable: False
|
||
|
||
executable adaptive
|
||
hs-source-dirs: benchmark
|
||
main-is: Adaptive.hs
|
||
default-language: Haskell2010
|
||
ghc-options: -O2 -Wall -with-rtsopts "-T"
|
||
|
||
if flag(has-llvm)
|
||
ghc-options: -fllvm
|
||
|
||
if flag(dev)
|
||
buildable: True
|
||
build-depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, gauge >= 0.2.4 && < 0.3
|
||
, random >= 1.0 && < 2.0
|
||
else
|
||
buildable: False
|
||
|
||
executable chart
|
||
default-language: Haskell2010
|
||
hs-source-dirs: benchmark
|
||
main-is: Chart.hs
|
||
if flag(dev) && !flag(no-charts) && !impl(ghcjs)
|
||
buildable: True
|
||
build-Depends:
|
||
base >= 4.8 && < 5
|
||
, bench-show >= 0.2 && < 0.3
|
||
, split
|
||
, transformers >= 0.4 && < 0.6
|
||
else
|
||
buildable: False
|
||
|
||
-------------------------------------------------------------------------------
|
||
-- Examples
|
||
-------------------------------------------------------------------------------
|
||
|
||
executable SearchQuery
|
||
default-language: Haskell2010
|
||
main-is: SearchQuery.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if (flag(examples) || flag(examples-sdl)) && !impl(ghcjs)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, http-conduit >= 2.2.2 && < 2.4
|
||
else
|
||
buildable: False
|
||
|
||
executable ListDir
|
||
default-language: Haskell2010
|
||
main-is: ListDir.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, path-io >= 0.1.0 && < 1.5
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
transformers >= 0.4 && < 0.6
|
||
else
|
||
buildable: False
|
||
|
||
executable MergeSort
|
||
default-language: Haskell2010
|
||
main-is: MergeSort.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, random >= 1.0.0 && < 2
|
||
else
|
||
buildable: False
|
||
|
||
executable AcidRain
|
||
default-language: Haskell2010
|
||
main-is: AcidRain.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, mtl >= 2.2 && < 3
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
semigroups >= 0.18 && < 0.19
|
||
, transformers >= 0.4 && < 0.6
|
||
else
|
||
buildable: False
|
||
|
||
executable CirclingSquare
|
||
default-language: Haskell2010
|
||
main-is: CirclingSquare.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, SDL >= 0.6.5 && < 0.7
|
||
else
|
||
buildable: False
|
||
|
||
executable ControlFlow
|
||
default-language: Haskell2010
|
||
main-is: ControlFlow.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
, exceptions >= 0.8 && < 0.11
|
||
, transformers >= 0.4 && < 0.6
|
||
, transformers-base >= 0.4 && < 0.5
|
||
if impl(ghc < 8.0)
|
||
build-depends:
|
||
semigroups >= 0.18 && < 0.19
|
||
else
|
||
buildable: False
|
||
|
||
executable HandleIO
|
||
default-language: Haskell2010
|
||
main-is: HandleIO.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
else
|
||
buildable: False
|
||
|
||
executable FileIO
|
||
default-language: Haskell2010
|
||
main-is: FileIO.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
else
|
||
buildable: False
|
||
|
||
executable EchoServer
|
||
default-language: Haskell2010
|
||
main-is: EchoServer.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
else
|
||
buildable: False
|
||
|
||
executable FileSinkServer
|
||
default-language: Haskell2010
|
||
main-is: FileSinkServer.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
else
|
||
buildable: False
|
||
|
||
executable FromFileClient
|
||
default-language: Haskell2010
|
||
main-is: FromFileClient.hs
|
||
hs-source-dirs: examples
|
||
ghc-options: -Wall
|
||
if flag(examples) || flag(examples-sdl)
|
||
buildable: True
|
||
build-Depends:
|
||
streamly
|
||
, base >= 4.8 && < 5
|
||
else
|
||
buildable: False
|