package bistro

  1. Overview
  2. Docs

Workflow constructors

val input : ?version:int -> string -> 'a pworkflow

Workflow constructor from an existing path

val shell : ?descr:string -> ?mem:int workflow -> ?np:int -> ?version:int -> Shell_dsl.command list -> 'a path workflow

Constructor for a workflow that execute a shell script. Its main argument is a list of Shell_dsl.cmd values. Other arguments are:

  • descr description of the workflow, used for logging
  • mem required memory
  • np maximum number of cores (could be given less at execution)
  • version version number, used to force the rebuild of a workflow
val select : directory path workflow -> string list -> 'a path workflow

Constructs a workflow from a directory workflow, by selecting a file in it

val cached_value : ?descr:string -> ?np:int -> ?mem:int workflow -> ?version:int -> (unit -> 'a) workflow -> 'a workflow
val cached_path : ?descr:string -> ?np:int -> ?mem:int workflow -> ?version:int -> (string -> unit) workflow -> 'a path workflow
val pure : id:string -> 'a -> 'a workflow

pure ~id x is a workflow that computes the value x. id should be a string identifying x, like a digest.

val pure_data : 'a -> 'a workflow

Similar to pure, but computes a digest as identifier. Does not work with closures or objects.

val int : int -> int workflow

int i is pure_data i

val string : string -> string workflow

string s is pure_data s

val app : ('a -> 'b) workflow -> 'a workflow -> 'b workflow

Applicative structure

val both : 'a workflow -> 'b workflow -> ('a * 'b) workflow

Applicative structure, useful for parallel binds

val eval_path : 'a path workflow -> string workflow
val eval_paths : 'a path workflow list -> string list workflow
val list : 'a workflow list -> 'a list workflow
val spawn : 'a list workflow -> f:('a workflow -> 'b workflow) -> 'b list workflow
val spawn2 : 'a list workflow -> 'b list workflow -> f:('a workflow -> 'b workflow -> 'c workflow) -> 'c list workflow
val glob : ?pattern:string -> ?type_selection:[ `File | `Directory ] -> directory pworkflow -> 'a path list workflow
OCaml

Innovation. Community. Security.