-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Orchestration-style co-ordination EDSL -- -- Provides an EDSL with Orc primitives. @package orc @version 1.1 -- | Hierarchical concurrent threads module Control.Concurrent.Hierarchical data HIO a runHIO :: HIO b -> IO b newPrimGroup :: IO Group newGroup :: HIO Group local :: Group -> HIO a -> HIO a close :: Group -> HIO () -- | The thread-registry environment is a hierarchical structure of local -- thread neighborhoods. type Group = (TVar Int, TVar Inhabitants) finished :: Group -> HIO () instance HasFork HIO instance MonadIO HIO instance Applicative HIO instance Monad HIO instance Functor HIO -- | The Orc EDSL in Haskell module Orc.Monad data Orc a stop :: Orc a eagerly :: Orc a -> Orc (Orc a) val :: Orc a -> Orc a (<+>) :: Orc a -> Orc a -> Orc a runOrc :: Orc a -> IO () instance MonadPlus Orc instance Applicative Orc instance MonadIO Orc instance Alternative Orc instance Monad Orc instance Functor Orc module Orc.Combinators signal :: Orc () -- | Cut executes an orc expression, waits for the first result, and then -- suppresses the rest, including killing any threads involved in -- computing the remainder. cut :: Orc a -> Orc a onlyUntil :: Orc a -> Orc b -> Orc b butAfter :: Orc a -> (Float, Orc a) -> Orc a timeout :: Float -> a -> Orc a -> Orc a silent :: Orc a -> Orc b liftList :: (MonadPlus list) => [a] -> list a repeating :: Orc a -> Orc a runChan :: Chan a -> Orc a -> IO () sync :: (a -> b -> c) -> Orc a -> Orc b -> Orc c notBefore :: Orc a -> Float -> Orc a syncList :: [Orc a] -> Orc [a] -- | Wait for a period of w seconds, then continue processing. delay :: (RealFrac a) => a -> Orc () -- | 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. printOrc :: (Show a) => Orc a -> IO () prompt :: String -> Orc String putStrLine :: String -> Orc () scan :: (a -> s -> s) -> s -> Orc a -> Orc s () :: Orc a -> Orc a -> Orc a count :: Orc a -> Orc (Either a Int) collect :: Orc a -> Orc [a] ignore :: Int -> Orc a -> Orc a first :: Int -> Orc a -> Orc a sandbox :: Orc a -> MVar (Maybe a) -> MVar () -> Orc () zipper :: Orc a -> Orc b -> Orc (a, b) zipp :: MVar (Maybe a) -> MVar (Maybe b) -> MVar () -> Orc (a, b) -- | Publish is a hyperstrict form of return. It is useful for combining -- results from multiple val computations, providing a -- synchronization point. publish :: (NFData a) => a -> Orc a module Orc