2017-11-20 15:33:13 +03:00
|
|
|
name: streamly
|
2018-06-05 15:33:55 +03:00
|
|
|
version: 0.2.1
|
2017-10-20 07:06:00 +03:00
|
|
|
synopsis: Beautiful Streaming, Concurrent and Reactive Composition
|
2017-12-02 18:39:06 +03:00
|
|
|
description:
|
2018-05-04 21:53:03 +03:00
|
|
|
Streamly, short for streaming concurrently, is a simple yet powerful
|
|
|
|
streaming library with concurrent merging and concurrent nested looping
|
|
|
|
support. A stream is just like a list except that it is a list of monadic
|
|
|
|
actions rather than pure values. Streamly streams can be generated,
|
|
|
|
consumed, combined, or transformed serially or concurrently. We can loop over
|
|
|
|
a stream serially or concurrently. We can also have serial or concurrent
|
|
|
|
nesting of loops. For those familiar with list transformer concept streamly
|
|
|
|
is a concurrent list transformer. Streamly uses standard composition
|
|
|
|
abstractions. Concurrent composition is just the same as serial composition
|
|
|
|
except that we use a simple combinator to request a concurrent composition
|
|
|
|
instead of serial. The programmer does not have to be aware of threads,
|
|
|
|
locking or synchronization to write scalable concurrent programs.
|
2017-10-20 07:06:00 +03:00
|
|
|
.
|
2018-05-04 21:53:03 +03:00
|
|
|
Streamly provides functionality that is equivalent to streaming libraries
|
|
|
|
like <https://hackage.haskell.org/package/pipes pipes> and
|
|
|
|
<https://hackage.haskell.org/package/conduit conduit> but with a simple list
|
|
|
|
like API. The streaming API of streamly is close to the monadic streams API
|
|
|
|
of the <https://hackage.haskell.org/package/vector vector> package and
|
|
|
|
similar in concept to the
|
|
|
|
<https://hackage.haskell.org/package/streaming streaming> package. In
|
|
|
|
addition to the streaming functionality, 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 functionality of the
|
|
|
|
<https://hackage.haskell.org/package/async async> package. 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>.
|
|
|
|
.
|
|
|
|
Streamly has excellent performance, see
|
|
|
|
<https://github.com/composewell/streaming-benchmarks streaming-benchmarks>
|
|
|
|
for a comparison of popular streaming libraries on micro-benchmarks. For
|
|
|
|
file IO, currently the library provides only one API to stream the lines in
|
|
|
|
the file as Strings. Future versions will provide better streaming file IO
|
|
|
|
options. Streamly interworks with the popular streaming libraries, see the
|
|
|
|
interworking section in "Streamly.Tutorial".
|
|
|
|
.
|
|
|
|
Where to find more information:
|
|
|
|
.
|
|
|
|
* @README@ shipped with the package for a quick overview
|
|
|
|
* "Streamly.Tutorial" module in the haddock documentation for a detailed introduction
|
|
|
|
* @examples@ directory in the package for some simple practical examples
|
2017-12-02 18:39:06 +03:00
|
|
|
|
2017-12-05 18:40:43 +03:00
|
|
|
homepage: https://github.com/composewell/streamly
|
|
|
|
bug-reports: https://github.com/composewell/streamly/issues
|
2017-09-04 13:26:05 +03:00
|
|
|
license: BSD3
|
2017-06-07 18:32:27 +03:00
|
|
|
license-file: LICENSE
|
2018-05-04 23:32:41 +03:00
|
|
|
tested-with: GHC==7.10.3, GHC==8.0.2, GHC==8.2.2, GHC==8.4.2
|
2017-09-04 13:19:11 +03:00
|
|
|
author: Harendra Kumar
|
2017-06-07 18:32:27 +03:00
|
|
|
maintainer: harendra.kumar@gmail.com
|
2017-09-04 13:19:11 +03:00
|
|
|
copyright: 2017 Harendra Kumar
|
2017-09-06 06:29:43 +03:00
|
|
|
category: Control, Concurrency, Streaming, Reactivity
|
2017-06-07 18:32:27 +03:00
|
|
|
stability: Experimental
|
|
|
|
build-type: Simple
|
|
|
|
cabal-version: >= 1.10
|
|
|
|
|
2017-12-04 13:39:36 +03:00
|
|
|
extra-source-files:
|
|
|
|
Changelog.md
|
|
|
|
README.md
|
2018-05-03 22:57:22 +03:00
|
|
|
bench.sh
|
2017-12-04 13:39:36 +03:00
|
|
|
stack-7.10.yaml
|
2018-05-24 15:05:18 +03:00
|
|
|
stack-8.0.yaml
|
2017-12-04 13:39:36 +03:00
|
|
|
stack.yaml
|
|
|
|
|
2017-10-18 09:21:38 +03:00
|
|
|
source-repository head
|
|
|
|
type: git
|
2017-12-05 18:40:43 +03:00
|
|
|
location: https://github.com/composewell/streamly
|
2017-10-18 09:21:38 +03:00
|
|
|
|
2018-05-27 07:22:00 +03:00
|
|
|
flag diag
|
|
|
|
description: Diagnostics build
|
|
|
|
manual: True
|
|
|
|
default: False
|
|
|
|
|
2017-09-14 06:10:50 +03:00
|
|
|
flag dev
|
2018-05-27 07:22:00 +03:00
|
|
|
description: Development build
|
2017-09-14 06:10:50 +03:00
|
|
|
manual: True
|
|
|
|
default: False
|
|
|
|
|
2017-10-18 09:21:38 +03:00
|
|
|
flag examples
|
2018-05-27 07:22:00 +03:00
|
|
|
description: Build including examples
|
2017-10-18 09:21:38 +03:00
|
|
|
manual: True
|
|
|
|
default: False
|
|
|
|
|
2017-12-01 12:04:46 +03:00
|
|
|
flag examples-sdl
|
2018-05-27 07:22:00 +03:00
|
|
|
description: Build including SDL examples
|
2017-12-01 12:04:46 +03:00
|
|
|
manual: True
|
|
|
|
default: False
|
|
|
|
|
2018-05-03 22:57:22 +03:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- Library
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
2017-06-07 18:32:27 +03:00
|
|
|
library
|
|
|
|
hs-source-dirs: src
|
2017-11-21 18:06:01 +03:00
|
|
|
other-modules: Streamly.Core
|
2017-11-20 15:33:13 +03:00
|
|
|
, Streamly.Streams
|
2017-11-21 18:06:01 +03:00
|
|
|
|
|
|
|
exposed-modules: Streamly.Prelude
|
2017-11-20 15:33:13 +03:00
|
|
|
, Streamly.Time
|
|
|
|
, Streamly.Tutorial
|
|
|
|
, Streamly
|
2017-11-21 18:06:01 +03:00
|
|
|
|
2017-06-07 18:32:27 +03:00
|
|
|
default-language: Haskell2010
|
2017-09-13 20:53:24 +03:00
|
|
|
ghc-options: -Wall
|
2017-09-14 06:10:50 +03:00
|
|
|
|
2018-05-27 07:22:00 +03:00
|
|
|
if flag(diag)
|
|
|
|
cpp-options: -DDIAGNOSTICS
|
|
|
|
|
2017-09-14 06:10:50 +03:00
|
|
|
if flag(dev)
|
2018-05-27 07:22:00 +03:00
|
|
|
cpp-options: -DDIAGNOSTICS
|
2017-09-14 06:10:50 +03:00
|
|
|
ghc-options: -Wmissed-specialisations
|
|
|
|
-Wall-missed-specialisations
|
|
|
|
-fno-ignore-asserts
|
|
|
|
if impl(ghc >= 8.0)
|
|
|
|
ghc-options: -Wcompat
|
2017-09-13 20:53:24 +03:00
|
|
|
-Wunrecognised-warning-flags
|
|
|
|
-Widentities
|
|
|
|
-Wincomplete-record-updates
|
|
|
|
-Wincomplete-uni-patterns
|
|
|
|
-Wredundant-constraints
|
|
|
|
-Wnoncanonical-monad-instances
|
|
|
|
-Wnoncanonical-monadfail-instances
|
2017-06-07 18:32:27 +03:00
|
|
|
|
2017-08-31 03:41:46 +03:00
|
|
|
build-depends: base >= 4.8 && < 5
|
|
|
|
, containers >= 0.5 && < 0.6
|
2018-05-17 08:52:29 +03:00
|
|
|
, heaps >= 0.3 && < 0.4
|
2018-05-27 06:25:03 +03:00
|
|
|
|
|
|
|
-- concurrency
|
|
|
|
, atomic-primops >= 0.8 && < 0.9
|
2018-05-17 08:52:29 +03:00
|
|
|
, lockfree-queue >= 0.2.3 && < 0.3
|
|
|
|
|
|
|
|
-- transfomers
|
2018-03-18 09:52:59 +03:00
|
|
|
, exceptions >= 0.8 && < 0.11
|
2017-08-31 03:41:46 +03:00
|
|
|
, monad-control >= 1.0 && < 2
|
|
|
|
, mtl >= 2.2 && < 3
|
2017-09-05 11:04:39 +03:00
|
|
|
, transformers >= 0.4 && < 0.6
|
2017-08-31 03:41:46 +03:00
|
|
|
, transformers-base >= 0.4 && < 0.5
|
2017-10-20 23:19:14 +03:00
|
|
|
|
2017-09-08 20:10:23 +03:00
|
|
|
if impl(ghc < 8.0)
|
|
|
|
build-depends:
|
|
|
|
semigroups >= 0.18 && < 0.19
|
2017-06-07 18:32:27 +03:00
|
|
|
|
2018-05-03 22:57:22 +03:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- Test suites
|
|
|
|
-------------------------------------------------------------------------------
|
2017-10-20 23:19:14 +03:00
|
|
|
|
2017-06-30 23:05:49 +03:00
|
|
|
test-suite test
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
main-is: Main.hs
|
|
|
|
hs-source-dirs: test
|
2018-05-17 11:41:23 +03:00
|
|
|
ghc-options: -O0 -Wall -threaded -with-rtsopts=-N4
|
2017-09-14 06:10:50 +03:00
|
|
|
if flag(dev)
|
|
|
|
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
|
2017-06-30 23:05:49 +03:00
|
|
|
build-depends:
|
2017-11-20 15:33:13 +03:00
|
|
|
streamly
|
2017-08-31 03:41:46 +03:00
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, hspec >= 2.0 && < 3
|
|
|
|
, containers >= 0.5 && < 0.6
|
2018-04-22 20:27:31 +03:00
|
|
|
, transformers >= 0.4 && < 0.6
|
|
|
|
, mtl >= 2.2 && < 3
|
|
|
|
, exceptions >= 0.8 && < 0.11
|
2017-06-30 23:05:49 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
|
2018-04-14 12:26:02 +03:00
|
|
|
test-suite properties
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
main-is: Prop.hs
|
|
|
|
hs-source-dirs: test
|
2018-05-17 11:41:23 +03:00
|
|
|
ghc-options: -O0 -Wall -threaded -with-rtsopts=-N4
|
2018-04-14 12:26:02 +03:00
|
|
|
if flag(dev)
|
2018-05-24 14:18:48 +03:00
|
|
|
cpp-options: -DDEVBUILD
|
2018-04-14 12:26:02 +03:00
|
|
|
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
|
2018-05-24 14:42:39 +03:00
|
|
|
, QuickCheck >= 2.10 && < 2.12
|
2018-04-14 12:26:02 +03:00
|
|
|
, hspec >= 2.0 && < 3
|
|
|
|
default-language: Haskell2010
|
|
|
|
|
2018-05-03 22:57:22 +03:00
|
|
|
test-suite loops
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
default-language: Haskell2010
|
|
|
|
main-is: loops.hs
|
|
|
|
hs-source-dirs: test
|
|
|
|
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
|
|
|
|
build-Depends:
|
|
|
|
streamly
|
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, random >= 1.0.0 && < 1.2
|
|
|
|
|
|
|
|
test-suite parallel-loops
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
default-language: Haskell2010
|
|
|
|
main-is: parallel-loops.hs
|
|
|
|
hs-source-dirs: test
|
|
|
|
build-Depends:
|
|
|
|
streamly
|
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, random >= 1.0.0 && < 1.2
|
|
|
|
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- Benchmarks
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
2018-04-23 11:12:33 +03:00
|
|
|
benchmark linear
|
2018-04-09 18:02:49 +03:00
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
hs-source-dirs: benchmark
|
2018-04-24 15:13:10 +03:00
|
|
|
main-is: Linear.hs
|
|
|
|
other-modules: LinearOps
|
2018-04-09 18:02:49 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
ghc-options: -O2 -Wall
|
|
|
|
if flag(dev)
|
|
|
|
ghc-options: -Wmissed-specialisations
|
|
|
|
-Wall-missed-specialisations
|
|
|
|
-fno-ignore-asserts
|
2018-04-23 11:12:33 +03:00
|
|
|
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.0 && < 1.5
|
|
|
|
, random >= 1.0 && < 2.0
|
|
|
|
, gauge >= 0.2.1 && < 0.3
|
|
|
|
|
|
|
|
benchmark nested
|
|
|
|
type: exitcode-stdio-1.0
|
|
|
|
hs-source-dirs: benchmark
|
2018-04-24 15:13:10 +03:00
|
|
|
main-is: Nested.hs
|
|
|
|
other-modules: NestedOps
|
2018-04-23 11:12:33 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
ghc-options: -O2 -Wall
|
|
|
|
if flag(dev)
|
|
|
|
ghc-options: -Wmissed-specialisations
|
|
|
|
-Wall-missed-specialisations
|
|
|
|
-fno-ignore-asserts
|
2018-04-09 18:02:49 +03:00
|
|
|
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.0 && < 1.5
|
|
|
|
, random >= 1.0 && < 2.0
|
|
|
|
, gauge >= 0.2.1 && < 0.3
|
|
|
|
|
2018-04-25 11:51:02 +03:00
|
|
|
executable chart-linear
|
2018-04-10 09:21:05 +03:00
|
|
|
default-language: Haskell2010
|
|
|
|
hs-source-dirs: benchmark
|
2018-04-25 11:51:02 +03:00
|
|
|
main-is: ChartLinear.hs
|
|
|
|
if flag(dev)
|
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
|
|
|
base >= 4.8 && < 5
|
|
|
|
, bench-graph
|
|
|
|
, split
|
|
|
|
else
|
|
|
|
buildable: False
|
|
|
|
|
|
|
|
executable chart-nested
|
|
|
|
default-language: Haskell2010
|
|
|
|
hs-source-dirs: benchmark
|
|
|
|
main-is: ChartNested.hs
|
2018-04-10 09:21:05 +03:00
|
|
|
if flag(dev)
|
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
|
|
|
base >= 4.8 && < 5
|
|
|
|
, bench-graph
|
|
|
|
, split
|
|
|
|
else
|
|
|
|
buildable: False
|
|
|
|
|
2018-05-03 22:57:22 +03:00
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
-- Examples
|
|
|
|
-------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
executable SearchQuery
|
2018-03-25 05:04:03 +03:00
|
|
|
default-language: Haskell2010
|
2018-05-03 22:57:22 +03:00
|
|
|
main-is: SearchQuery.hs
|
2017-10-18 09:21:38 +03:00
|
|
|
hs-source-dirs: examples
|
2018-04-17 15:19:35 +03:00
|
|
|
if flag(examples) || flag(examples-sdl)
|
2017-10-18 09:21:38 +03:00
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
2017-11-20 15:33:13 +03:00
|
|
|
streamly
|
2018-05-03 22:57:22 +03:00
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, http-conduit >= 2.2.2 && < 2.4
|
2017-10-18 09:21:38 +03:00
|
|
|
else
|
|
|
|
buildable: False
|
|
|
|
|
2018-05-03 22:57:22 +03:00
|
|
|
executable ListDir
|
2018-03-25 05:04:03 +03:00
|
|
|
default-language: Haskell2010
|
2018-05-03 22:57:22 +03:00
|
|
|
main-is: ListDir.hs
|
2017-10-18 09:21:38 +03:00
|
|
|
hs-source-dirs: examples
|
2018-04-17 15:19:35 +03:00
|
|
|
if flag(examples) || flag(examples-sdl)
|
2017-10-18 09:21:38 +03:00
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
2017-11-20 15:33:13 +03:00
|
|
|
streamly
|
2018-05-03 22:57:22 +03:00
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, path-io >= 0.1.0 && < 1.4
|
2018-05-04 23:37:35 +03:00
|
|
|
if impl(ghc < 8.0)
|
|
|
|
build-depends:
|
|
|
|
transformers >= 0.4 && < 0.6
|
2017-10-18 09:21:38 +03:00
|
|
|
else
|
|
|
|
buildable: False
|
|
|
|
|
2018-05-03 22:57:22 +03:00
|
|
|
executable MergeSort
|
2018-03-25 05:04:03 +03:00
|
|
|
default-language: Haskell2010
|
2018-05-03 22:57:22 +03:00
|
|
|
main-is: MergeSort.hs
|
2017-10-18 09:21:38 +03:00
|
|
|
hs-source-dirs: examples
|
2018-04-17 15:19:35 +03:00
|
|
|
if flag(examples) || flag(examples-sdl)
|
2017-10-18 09:21:38 +03:00
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
2017-11-20 15:33:13 +03:00
|
|
|
streamly
|
2017-12-04 13:39:36 +03:00
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, random >= 1.0.0 && < 1.2
|
2018-05-03 22:57:22 +03:00
|
|
|
else
|
|
|
|
buildable: False
|
|
|
|
|
|
|
|
executable AcidRain
|
|
|
|
default-language: Haskell2010
|
|
|
|
main-is: AcidRain.hs
|
|
|
|
hs-source-dirs: examples
|
|
|
|
if flag(examples) || flag(examples-sdl)
|
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
|
|
|
streamly
|
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, mtl >= 2.2 && < 3
|
2018-05-03 23:13:07 +03:00
|
|
|
if impl(ghc < 8.0)
|
|
|
|
build-depends:
|
|
|
|
semigroups >= 0.18 && < 0.19
|
2018-05-04 23:37:35 +03:00
|
|
|
, transformers >= 0.4 && < 0.6
|
2018-05-03 22:57:22 +03:00
|
|
|
else
|
|
|
|
buildable: False
|
|
|
|
|
|
|
|
executable CirclingSquare
|
|
|
|
default-language: Haskell2010
|
|
|
|
main-is: CirclingSquare.hs
|
|
|
|
hs-source-dirs: examples
|
|
|
|
if flag(examples-sdl)
|
|
|
|
buildable: True
|
|
|
|
build-Depends:
|
|
|
|
streamly
|
|
|
|
, base >= 4.8 && < 5
|
|
|
|
, SDL >= 0.6.5 && < 0.7
|
2017-10-18 09:21:38 +03:00
|
|
|
else
|
|
|
|
buildable: False
|