streamly/streamly.cabal

277 lines
9.1 KiB
Plaintext
Raw Normal View History

name: streamly
version: 0.1.0
2017-10-20 07:06:00 +03:00
synopsis: Beautiful Streaming, Concurrent and Reactive Composition
2017-11-21 12:11:09 +03:00
description: Streamly unifies concurrency and streaming in a single monad
transformer with a concise and simple API. It provides two ways to combine
streams, a monadic product composition as well as the standard pipelined
composition provided by streaming libraries. A natural extension of regular
monadic composition to streaming and concurrency makes it intuitive and
2017-11-22 20:30:11 +03:00
concise with almost universal application. You can write concurrent or
2017-11-21 12:11:09 +03:00
non-concurrent applications using simple IO, logic programming, streaming IO
or reactive programming (FRP) using the same API. You can also think about it
as representing concurrent and composable state machines in imperative terms.
It unifies the core functionality provided by
<https://hackage.haskell.org/package/async async>,
<(https://hackage.haskell.org/package/logict logict>,
<https://hackage.haskell.org/package/list-t list-t>,
<https://hackage.haskell.org/package/conduit conduit>\/<https://hackage.haskell.org/package/pipes pipes>,
<https://hackage.haskell.org/package/Yampa Yampa>\/<https://hackage.haskell.org/package/reflex reflex>
under one type and API. It interworks with the existing streaming libraries.
2017-10-20 07:06:00 +03:00
.
2017-11-21 12:11:09 +03:00
Streamly provides high level concurrency primitives (higher level than async)
and hides the low level concurrency details completely from the programmer.
Concurrency can be used with ease in applicative or monadic contexts. The
programmer just expresses whether a task can run in parallel with another.
Threads, synchronization and concurrency rate control are handled
automatically under the hood. The concurrency facilities provided by streamly
can be compared with <https://en.wikipedia.org/wiki/OpenMP OpenMP> and
<https://en.wikipedia.org/wiki/Cilk Cilk> but with a more declarative
expression. Concurrency support does not compromise performance in
non-concurrent cases, the performance of the library is at par or better than
most of the existing streaming libraries.
2017-10-20 07:06:00 +03:00
.
2017-10-20 08:19:15 +03:00
Here is a simple example to concurrently and recursively list the contents of
a directory tree:
2017-10-20 07:06:00 +03:00
.
> import Path.IO (listDir, getCurrentDir)
> import Streamly
2017-10-20 07:06:00 +03:00
>
2017-11-20 23:05:45 +03:00
> main = runStreaming $ serially $ getCurrentDir >>= readdir
2017-10-20 07:06:00 +03:00
> where readdir d = do
> (dirs, files) <- lift $ listDir d
> liftIO $ mapM_ putStrLn $ map show files
> foldMapWith (<|>) readdir dirs
.
See "Streamly.Tutorial" and "Streamly.Examples" (available only when built
with 'examples' build flag) for more details.
2017-10-20 07:06:00 +03:00
.
This library was originally inspired by the `transient`
package authored by Alberto G. Corona.
homepage: http://github.com/harendra-kumar/streamly
bug-reports: https://github.com/harendra-kumar/streamly/issues
license: BSD3
license-file: LICENSE
author: Harendra Kumar
maintainer: harendra.kumar@gmail.com
copyright: 2017 Harendra Kumar
2017-09-06 06:29:43 +03:00
category: Control, Concurrency, Streaming, Reactivity
stability: Experimental
build-type: Simple
cabal-version: >= 1.10
2017-10-18 09:21:38 +03:00
source-repository head
type: git
location: https://github.com/harendra-kumar/streamly
2017-10-18 09:21:38 +03:00
2017-09-14 06:10:50 +03:00
flag dev
description: Build development version
manual: True
default: False
flag extra-benchmarks
description: Include comparative benchmarks
manual: True
default: False
2017-10-18 09:21:38 +03:00
flag examples
description: Build examples
manual: True
default: False
flag examples-sdl
description: Include examples that use SDL dependency
manual: True
default: False
library
hs-source-dirs: src
other-modules: Streamly.Core
, Streamly.Streams
exposed-modules: Streamly.Prelude
, Streamly.Time
, Streamly.Tutorial
, Streamly
if flag(examples) || flag(examples-sdl)
exposed-modules: Streamly.Examples
, Streamly.Examples.SearchEngineQuery
, Streamly.Examples.ListDirRecursive
, Streamly.Examples.MergeSortedStreams
, Streamly.Examples.AcidRainGame
if flag(examples-sdl)
exposed-modules: Streamly.Examples.CirclingSquare
default-language: Haskell2010
ghc-options: -Wall
2017-09-14 06:10:50 +03:00
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(examples-sdl)
cpp-options: -DEXAMPLES_SDL
2017-08-31 03:41:46 +03:00
build-depends: base >= 4.8 && < 5
, atomic-primops >= 0.8 && < 0.9
2017-08-31 03:41:46 +03:00
, containers >= 0.5 && < 0.6
, exceptions >= 0.8 && < 0.9
, lifted-base >= 0.2 && < 0.3
, lockfree-queue >= 0.2.3 && < 0.3
2017-08-31 03:41:46 +03:00
, monad-control >= 1.0 && < 2
, mtl >= 2.2 && < 3
, stm >= 2.4.3 && < 2.5
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-09-08 20:10:23 +03:00
if impl(ghc < 8.0)
build-depends:
semigroups >= 0.18 && < 0.19
if flag(examples) || flag(examples-sdl)
build-Depends:
http-conduit
, path-io
, random
if flag(examples-sdl)
build-Depends:
SDL >= 0.6.5 && < 0.7
test-suite test
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test
2017-09-14 06:10:50 +03:00
ghc-options: -O0 -Wall
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
build-depends:
streamly
2017-08-31 03:41:46 +03:00
, base >= 4.8 && < 5
, hspec >= 2.0 && < 3
, containers >= 0.5 && < 0.6
2017-09-05 11:04:39 +03:00
if impl(ghc < 8.0)
build-depends:
transformers >= 0.4 && < 0.6
default-language: Haskell2010
2017-07-17 18:58:04 +03:00
benchmark bench
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: benchmark
2017-09-14 06:10:50 +03:00
ghc-options: -O2 -Wall
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
2017-07-17 18:58:04 +03:00
build-depends:
streamly
2017-08-31 03:41:46 +03:00
, atomic-primops >= 0.8 && < 0.9
, base >= 4.8 && < 5
, criterion >= 1 && < 2
, mtl >= 2.2 && < 3
if impl(ghc < 8.0)
build-depends:
transformers >= 0.4 && < 0.6
if flag(extra-benchmarks)
cpp-options: -DEXTRA_BENCHMARKS
build-depends:
list-t >= 0.4 && < 2
, logict >= 0.6 && < 0.7
, machines >= 0.5 && < 0.7
, simple-conduit >= 0.6 && < 0.7
, transient >= 0.4 && < 0.6
2017-07-17 18:58:04 +03:00
default-language: Haskell2010
-------------------------------------------------------------------------------
-- Examples
-------------------------------------------------------------------------------
2017-10-18 09:21:38 +03:00
executable echo-loop
main-is: echo-loop.hs
hs-source-dirs: examples
if flag(examples)
buildable: True
build-Depends:
streamly
2017-10-18 09:21:38 +03:00
, base >= 4.8 && < 5
else
buildable: False
executable loops
main-is: loops.hs
hs-source-dirs: examples
if flag(examples)
buildable: True
build-Depends:
streamly
2017-10-18 09:21:38 +03:00
, base >= 4.8 && < 5
else
buildable: False
executable map-reduce
main-is: map-reduce.hs
hs-source-dirs: examples
if flag(examples)
buildable: True
build-Depends:
streamly
2017-10-18 09:21:38 +03:00
, base >= 4.8 && < 5
else
buildable: False
executable nested-loops
main-is: nested-loops.hs
hs-source-dirs: examples
if flag(examples)
buildable: True
build-Depends:
streamly
2017-10-18 09:21:38 +03:00
, base >= 4.8 && < 5
, random
else
buildable: False
executable parallel-loops
main-is: parallel-loops.hs
hs-source-dirs: examples
if flag(examples)
buildable: True
build-Depends:
streamly
2017-10-18 09:21:38 +03:00
, base >= 4.8 && < 5
, random
else
buildable: False