-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Scientific workflow management system -- @package SciFlow @version 0.2.0 module Scientific.Workflow.Serialization class Serializable a serialize :: Serializable a => a -> ByteString deserialize :: Serializable a => ByteString -> Maybe a module Scientific.Workflow.Serialization.Yaml class Serializable a serialize :: Serializable a => a -> ByteString deserialize :: Serializable a => ByteString -> Maybe a instance (FromJSON a, ToJSON a) => Serializable a module Scientific.Workflow.Serialization.Show instance (Read a, Show a) => Serializable a module Scientific.Workflow.Builder data Factor S :: String -> Factor L :: String -> String -> Factor L2 :: (String, String) -> String -> Factor L3 :: (String, String, String) -> String -> Factor L4 :: (String, String, String, String) -> String -> Factor L5 :: (String, String, String, String, String) -> String -> Factor L6 :: (String, String, String, String, String, String) -> String -> Factor data B B :: [(String, String, Text)] -> [(String, Factor)] -> B _nodes :: B -> [(String, String, Text)] _links :: B -> [(String, Factor)] type Builder = State B -- | Declare a computational node node :: String -> String -> Text -> Builder () -- | many-to-one generalized link function link :: [String] -> String -> Builder () -- | (~>) = link. (~>) :: [String] -> String -> Builder () -- | singleton singleton :: String -> Builder () -- | Declare a path. path :: [String] -> Builder () -- | one-to-one link link1 :: String -> String -> Builder () -- | two-to-one link link2 :: (String, String) -> String -> Builder () -- | tree-to-one link link3 :: (String, String, String) -> String -> Builder () link4 :: (String, String, String, String) -> String -> Builder () link5 :: (String, String, String, String, String) -> String -> Builder () link6 :: (String, String, String, String, String, String) -> String -> Builder () data Graph Graph :: HashMap String [String] -> HashMap String [String] -> [String] -> Graph _children :: Graph -> HashMap String [String] _parents :: Graph -> HashMap String [String] _vertice :: Graph -> [String] children :: String -> Graph -> [String] parents :: String -> Graph -> [String] leaves :: Graph -> [String] fromFactors :: [Factor] -> Graph module Scientific.Workflow.Types data Workflow Workflow :: IOProcessor () b -> Workflow -- | labeled Arrow newtype Processor m a b Processor :: (a -> m b) -> Processor m a b runProcessor :: Processor m a b -> a -> m b -- | Label is a pair of side effects type Label m l o = (l -> m (Maybe o), l -> o -> m ()) -- | Turn a Kleisli arrow into a labeled arrow label :: (MonadTrans t, Monad m, Monad (t m)) => Label (t m) l b -> l -> Kleisli m a b -> Processor (t m) a b type IOProcessor = Processor (ReaderT Config IO) type Actor = Kleisli IO actor :: (a -> IO b) -> Actor a b -- | Source produce an output without taking inputs type Source i = IOProcessor () i proc :: Serializable b => String -> Kleisli IO a b -> IOProcessor a b source :: Serializable o => String -> o -> Source o recover :: Serializable a => String -> ReaderT Config IO (Maybe a) save :: Serializable a => String -> a -> ReaderT Config IO () fileExist :: FilePath -> IO Bool -- | zip two sources zipS :: Source a -> Source b -> Source (a, b) zipS3 :: Source a -> Source b -> Source c -> Source (a, b, c) zipS4 :: Source a -> Source b -> Source c -> Source d -> Source (a, b, c, d) zipS5 :: Source a -> Source b -> Source c -> Source d -> Source e -> Source (a, b, c, d, e) zipS6 :: Source a -> Source b -> Source c -> Source d -> Source e -> Source f -> Source (a, b, c, d, e, f) data Config Config :: !FilePath -> Config _baseDir :: Config -> !FilePath data WorkflowOpt WorkflowOpt :: !FilePath -> WorkflowOpt _logDir :: WorkflowOpt -> !FilePath instance Default WorkflowOpt instance Monad m => Arrow (Processor m) instance Monad m => Category (Processor m) module Scientific.Workflow.Builder.TH mkWorkflow :: String -> Builder () -> Q [Dec] declareNodes :: [(String, String)] -> Q [Dec] linkNodes :: Factor -> HashMap String Factor -> Q Exp module Scientific.Workflow runWorkflow :: [Workflow] -> WorkflowOpt -> IO () mapA :: Monad m => Kleisli m a b -> Kleisli m [a] [b]