SciFlow 0.6.1 → 0.6.2
raw patch · 3 files changed
+12/−4 lines, 3 files
Files
- SciFlow.cabal +2/−2
- src/Scientific/Workflow.hs +1/−0
- src/Scientific/Workflow/Main.hs +9/−2
SciFlow.cabal view
@@ -1,5 +1,5 @@ name: SciFlow-version: 0.6.1+version: 0.6.2 synopsis: Scientific workflow management system description: SciFlow is a DSL for building scientific workflows. Workflows built with SciFlow can be run either on desktop@@ -9,7 +9,7 @@ license-file: LICENSE author: Kai Zhang maintainer: kai@kzhang.org-copyright: (c) 2015-2017 Kai Zhang+copyright: (c) 2015-2018 Kai Zhang category: Control build-type: Simple cabal-version: >=1.10
src/Scientific/Workflow.hs view
@@ -68,6 +68,7 @@ , ContextData(..) , WorkflowConfig+ , Workflow(..) ) where import Scientific.Workflow.Internal.Builder
src/Scientific/Workflow/Main.hs view
@@ -68,7 +68,9 @@ { preAction :: Name -- ^ An action to be execute before the workflow. -- The action should have type: @'IO' () -> 'IO' ()@. -- e.g., some initialization processes.- , programHeader :: String+ , programHeader :: String -- ^ Short description about the program.+ , workflowConfigType :: Maybe Name -- ^ The type of workflow config. Default is+ -- @Nothing@ which let type inference do its job. } T.deriveLift ''MainOpts@@ -77,6 +79,7 @@ defaultMainOpts = MainOpts { preAction = 'id , programHeader = printf "SciFlow-%s" (showVersion version)+ , workflowConfigType = Nothing } defaultMain :: Builder () -> Q [Dec]@@ -88,8 +91,12 @@ main_q <- [d| main = mainFunc $(varE $ preAction opts) dag $(varE $ mkName wfName) (programHeader opts) |]- return $ wf_q ++ main_q+ return $ wfType ++ wf_q ++ main_q where+ wfType = case workflowConfigType opts of+ Nothing -> []+ Just ty -> [SigD (mkName wfName) $ AppT (ConT $ mkName "Workflow") $+ ConT ty] wfName = "sciFlowDefaultMain" dag = nmap (\x -> (_nodePid x, _nodeAttr x)) $ mkDAG builder {-# INLINE mainWith #-}