[Haskell] ANN: Streaming Component Combinators 0.4

Mario Blažević mblazevic at stilo.com
Thu Jan 7 19:29:10 EST 2010

Version 0.4 of Streaming Component Combinators, or SCC for short, has
been released on Hackage. Get it at


    There isn't much new high-level functionality compared to the
previous version, but the implementation has been heavily refactored and
the foundations completely replaced.

    I'm particularly happy to have found a way to drop the ugly reliance
on Data.Dynamic and to encode the required constraints in the type
system instead. The foundation of streaming components in this version
is the new Control.Concurrent.Coroutine module, whose main export is the monad
transformer Coroutine. It can transform any monad into a suspendable, resumable,
trampoline-style-runnable monad. Coroutines can be nested, which was the
requirement for streaming and the main stumbling block for the implementation.
The solution, worth at least 10 milliOlegs according to my estimate, was to
parameterize the Coroutine with a functor that wraps the coroutine suspension,
and to use nested functors for suspension from nested coroutines. The type system
automatically figures out how many wrappings to apply to each suspension
depending on how many intermediate coroutines it suspends.

   In other news is the project's Wiki page at
http://trac.haskell.org/SCC/wiki/. It's still rudimentary, but growing.

   All feedback will be appreciated.

More information about the Haskell mailing list