streamly/streamly.cabal
2017-11-21 01:35:45 +05:30

252 lines
8.2 KiB
Plaintext

name: streamly
version: 0.1.0
synopsis: Beautiful Streaming, Concurrent and Reactive Composition
description: Streamly is a general streaming and concurrent programming
monad allowing you to write a wide variety of applications ranging from
simple applications utilizing streaming IO to massively parallel concurrent
applications as well as reactive (FRP) applications with the same ease.
Streamly provides high level concurrency primitives and hides the low level
concurrency details completely from the programmer. The programmer just
expresses whether a task can run in parallel with another. Threads,
synchronization and concurrency rate control are handled automatically. The
library has been written keeping high performance applications in mind.
.
Streamly subsumes all the use cases of list transformer (list-t) and logic
programming (logict) monads and adds concurrency on top. It is a streaming
library and therefore can be used for most of the streaming use cases as well
(i.e. where you would use conduit or pipes) with concurrency added. It is
also a first class reactive programming library and can be used where you
would use libraries like Yampa or reflex. One way to think about it is to
think of it as composable state machines with concurrency. You can write from
really simple to complex applications, from streaming to FRP or massively
concurrent applications using the same simple and concise abstractions.
.
Here is a simple example to concurrently and recursively list the contents of
a directory tree:
.
> import Path.IO (listDir, getCurrentDir)
> import Streamly
>
> main = runStreaming $ serially $ getCurrentDir >>= readdir
> where readdir d = do
> (dirs, files) <- lift $ listDir d
> liftIO $ mapM_ putStrLn $ map show files
> foldMapWith (<|>) readdir dirs
.
See "Streamly.Tutorial" and "Streamly.Examples" for more details.
.
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
category: Control, Concurrency, Streaming, Reactivity
stability: Experimental
build-type: Simple
cabal-version: >= 1.10
source-repository head
type: git
location: https://github.com/harendra-kumar/streamly
flag dev
description: Build development version
manual: True
default: False
flag extra-benchmarks
description: Include comparative benchmarks
manual: True
default: False
flag examples
description: Build examples
manual: True
default: False
library
hs-source-dirs: src
exposed-modules: Streamly.Core
, Streamly.Streams
, Streamly.Prelude
, Streamly.Time
, Streamly.Tutorial
, Streamly
if flag(examples)
exposed-modules: Streamly.Examples.SearchEngineQuery
, Streamly.Examples.ListDirRecursive
, Streamly.Examples.MergeSortedStreams
, Streamly.Examples.AcidRainGame
, Streamly.Examples.CirclingSquare
default-language: Haskell2010
ghc-options: -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
build-depends: base >= 4.8 && < 5
, atomic-primops >= 0.8 && < 0.9
, containers >= 0.5 && < 0.6
, exceptions >= 0.8 && < 0.9
, lifted-base >= 0.2 && < 0.3
, lockfree-queue >= 0.2.3 && < 0.3
, monad-control >= 1.0 && < 2
, mtl >= 2.2 && < 3
, stm >= 2.4.3 && < 2.5
, transformers >= 0.4 && < 0.6
, transformers-base >= 0.4 && < 0.5
if impl(ghc < 8.0)
build-depends:
semigroups >= 0.18 && < 0.19
if flag(examples)
build-Depends:
http-conduit
, path-io
, random
, SDL >= 0.6.5 && < 0.7
test-suite test
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: test
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
, base >= 4.8 && < 5
, hspec >= 2.0 && < 3
, containers >= 0.5 && < 0.6
if impl(ghc < 8.0)
build-depends:
transformers >= 0.4 && < 0.6
default-language: Haskell2010
benchmark bench
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: benchmark
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
build-depends:
streamly
, 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
default-language: Haskell2010
-------------------------------------------------------------------------------
-- Examples
-------------------------------------------------------------------------------
executable echo-loop
main-is: echo-loop.hs
hs-source-dirs: examples
if flag(examples)
buildable: True
build-Depends:
streamly
, 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
, 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
, 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
, 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
, base >= 4.8 && < 5
, random
else
buildable: False