[Haskell] Announce: SCC, Streaming Component Combinator library
Mario Blazevic
mblazevic at stilo.com
Fri May 9 10:59:17 EDT 2008
I'm pleased to announce the 0.1 release of Streaming Component
Combinators in Haskell, based on my earlier work done in OmniMark and
published in paper
Mario Blažević, Streaming component combinators, Extreme Markup
Languages, 2006.
http://www.idealliance.org/papers/extreme/proceedings/html/2006/Blazevic01/EML2006Blazevic01.html
The release consists of the following:
- Yet another monad transformer with coroutine functionality. Its
central feature is the function
pipe :: forall context x m r1 r2. Monad m =>
Producer m x r1 -> Consumer m x r2 -> Pipe context m (r1, r2)
- Based on the above, streaming component types Transducer and Splitter
are defined, as well as a number of primitive component instances.
- Next are component combinators that can be used to synthesize larger
components.
- Finally, there is a rudimentary executable, shsh (Streaming Haskell
SHell), that exposes most of the above within a command-line shell. It's
useful for experiments and testing of new components.
Here are a few simple command examples:
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
The SCC library and shell are available on Hackage, at
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/scc-0.1
More information about the Haskell
mailing list