orc-1.1.2.0: Orchestration-style co-ordination EDSL

StabilityPortability : concurrency
MaintainerJohn Launchbury <john@galois.com>

Orc.Combinators

Description

 

Synopsis

Documentation

cut :: Orc a -> Orc aSource

Cut executes an orc expression, waits for the first result, and then suppresses the rest, including killing any threads involved in computing the remainder.

onlyUntil :: Orc a -> Orc b -> Orc bSource

butAfter :: Orc a -> (Float, Orc a) -> Orc aSource

timeout :: Float -> a -> Orc a -> Orc aSource

silent :: Orc a -> Orc bSource

liftList :: MonadPlus list => [a] -> list aSource

runChan :: Chan a -> Orc a -> IO ()Source

sync :: (a -> b -> c) -> Orc a -> Orc b -> Orc cSource

syncList :: [Orc a] -> Orc [a]Source

delay :: RealFrac a => a -> Orc ()Source

Wait for a period of w seconds, then continue processing.

printOrc :: Show a => Orc a -> IO ()Source

printOrc and prompt uses the Stdinout library to provide basic console input/output in a concurrent setting. runOrc executes an orc expression and prints out the answers eagerly per line.

scan :: (a -> s -> s) -> s -> Orc a -> Orc sSource

(<?>) :: Orc a -> Orc a -> Orc aSource

collect :: Orc a -> Orc [a]Source

takeOrc :: Int -> Orc a -> Orc aSource

List-like functions

dropOrc :: Int -> Orc a -> Orc aSource

zipOrc :: Orc a -> Orc b -> Orc (a, b)Source

sandbox :: Orc a -> MVar (Maybe a) -> MVar () -> Orc ()Source

echo :: Int -> MVar (Maybe a) -> MVar () -> Orc aSource

zipp :: MVar (Maybe a) -> MVar (Maybe b) -> MVar () -> Orc (a, b)Source

publish :: NFData a => a -> Orc aSource

Publish is a hyperstrict form of return. It is useful for combining results from multiple val computations, providing a synchronization point.