MyNixOS website logo
Description

Streaming component combinators.

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.

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.

Metadata

Version

0.8.4

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows