packages feed

streamly-0.2.1: streamly.cabal

name:               streamly
version:            0.2.1
synopsis:           Beautiful Streaming, Concurrent and Reactive Composition
description:
  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.
  .
  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

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.2.2, GHC==8.4.2
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

extra-source-files:
    Changelog.md
    README.md
    bench.sh
    stack-7.10.yaml
    stack.yaml

source-repository head
    type: git
    location: https://github.com/composewell/streamly

flag dev
  description: Build development version
  manual: True
  default: False

flag examples
  description: Build examples
  manual: True
  default: False

flag examples-sdl
  description: Include examples that use SDL dependency
  manual: True
  default: False

-------------------------------------------------------------------------------
-- Library
-------------------------------------------------------------------------------

library
    hs-source-dirs:    src
    other-modules:     Streamly.Core
                     , Streamly.Streams

    exposed-modules:   Streamly.Prelude
                     , Streamly.Time
                     , Streamly.Tutorial
                     , Streamly

    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.11
                     , 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

-------------------------------------------------------------------------------
-- Test suites
-------------------------------------------------------------------------------

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
    , transformers      >= 0.4   && < 0.6
    , mtl               >= 2.2   && < 3
    , exceptions        >= 0.8   && < 0.11
  default-language: Haskell2010

test-suite properties
  type: exitcode-stdio-1.0
  main-is: Prop.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
    , QuickCheck        >= 2.8   && < 2.12
    , hspec             >= 2.0   && < 3
  default-language: Haskell2010

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
-------------------------------------------------------------------------------

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
  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.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
  main-is: Nested.hs
  other-modules: NestedOps
  default-language: Haskell2010
  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
    , base                >= 4.8   && < 5
    , deepseq             >= 1.4.0 && < 1.5
    , random              >= 1.0   && < 2.0
    , gauge               >= 0.2.1 && < 0.3

executable chart-linear
  default-language: Haskell2010
  hs-source-dirs: benchmark
  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
  if flag(dev)
    buildable: True
    build-Depends:
        base >= 4.8 && < 5
      , bench-graph
      , split
  else
    buildable: False

-------------------------------------------------------------------------------
-- Examples
-------------------------------------------------------------------------------

executable SearchQuery
  default-language: Haskell2010
  main-is: SearchQuery.hs
  hs-source-dirs:  examples
  if flag(examples) || flag(examples-sdl)
    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
  if flag(examples) || flag(examples-sdl)
    buildable: True
    build-Depends:
        streamly
      , base    >= 4.8   && < 5
      , path-io >= 0.1.0 && < 1.4
    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
  if flag(examples) || flag(examples-sdl)
    buildable: True
    build-Depends:
        streamly
      , base   >= 4.8   && < 5
      , random >= 1.0.0 && < 1.2
  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
    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
  if flag(examples-sdl)
    buildable: True
    build-Depends:
        streamly
      , base >= 4.8   && < 5
      , SDL  >= 0.6.5 && < 0.7
  else
    buildable: False