scc: Streaming component combinators

[ combinators, concurrency, control, library, program ] [ Propose Tags ] [ Report a vulnerability ]

SCC is a layered library of Streaming Component Combinators. The lowest layer in Control.Concurent.SCC.Streams defines stream abstractions and nested producer-consumer coroutine pairs based on the Coroutine monad transformer. On top of that are streaming component types, a number of primitive streaming components and a set of component combinators. Finally, there is an executable that exposes all the framework functionality in a command-line shell.

The original library design is based on paper http://conferences.idealliance.org/extreme/html/2006/Blazevic01/EML2006Blazevic01.html

Mario Blažević, Streaming component combinators, Extreme Markup Languages, 2006.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.2, 0.3, 0.4, 0.5, 0.5.1, 0.6, 0.6.1, 0.7, 0.7.1, 0.8, 0.8.1, 0.8.2, 0.8.2.1, 0.8.2.2, 0.8.2.4, 0.8.3, 0.8.3.1, 0.8.4
Dependencies base (<5), bytestring (<1.0), containers, haskeline, incremental-parser (>=0.4 && <0.6), monad-coroutine (>=0.9 && <0.10), monad-parallel, monoid-subclasses (>=0.2 && <1.3), parsec (>=3 && <4), process, text (<3), transformers (>=0.2 && <0.7), transformers-compat (>=0.3 && <0.8) [details]
Tested with ghc ==7.4, ghc ==7.6, ghc ==7.8, ghc ==7.10
License LicenseRef-GPL
Copyright (c) 2008-2016 Mario Blazevic
Author Mario Blazevic
Maintainer blamario@protonmail.com
Category Control, Combinators, Concurrency
Home page https://hub.darcs.net/blamario/SCC.wiki
Source repo head: darcs get https://hub.darcs.net/blamario/SCC
Uploaded by MarioBlazevic at 2024-06-05T20:54:23Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables shsh
Downloads 11147 total (43 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2024-06-05 [all 1 reports]

Readme for scc-0.8.4

[back to package description]

Installation

If you have Cabal-Install installed, the following two commands should install the latest SCC package on your system:

cabal update
cabal install scc

If everything goes well, there should be executable named shsh. On Unix it gets installed in your $HOME/.cabal/bin/ directory by default.

Command-line Shell

To see the options supported by shsh, type shsh --help and you'll get:

Usage: shsh (-c <command> | -f <file> | -i | -s) 
  -c       --command      Execute a single command
  -h       --help         Show help
  -f file  --file=file    Execute commands from a script file
  -i       --interactive  Execute commands interactively
  -s       --stdin        Execute commands from the standard input

Here are a few simple command examples:

 Bash + GNU tools          shsh
 ----------------          ----
 echo "Hello, World!"      echo "Hello, World!\n"
 wc -c                     count | show | concatenate
 wc -l                     foreach line then substitute x else suppress end | count | show | concatenate
 grep "foo"                foreach line having substring "foo" then append "\n" else suppress end
 sed "s:foo:bar:"          foreach substring "foo" then substitute "bar" end
 sed "s:foo:[\\&]:"        foreach substring "foo" then prepend "[" | append "]" end
 sed "s:foo:[\\&, \\&]:"   foreach substring "foo" then id; echo ", "; id end

Using the framework from Haskell

The shell interface is basically only syntax on top of the underlying EDSL (embedded domain-specific language) in Haskell. If you require anything more than stringing together of existing components using existing combinators, you'll need to write Haskell code.