package bistro

  1. Overview
  2. Docs

Representation of scripts

type template
val dest : template

Symbol representing the location where a workflow is expected to produce its result

val tmp : template

Symbol representing an existing empty directory that can be used as a temporary space for a workflow's execution.

val np : template

Symbol representing the number of cores allocated to the workflow

val mem : template

Symbol representing the memory size allocated to the workflow, in GB.

val string : string -> template

A chunk of text

val int : int -> template

Int formatting

val float : float -> template

Float formatting

val dep : _ path workflow -> template

dep w is interpreted as the path where to find the result of workflow w

val deps : ?quote:char -> sep:string -> _ path list workflow -> template
val string_dep : string workflow -> template

string_dep w is interpreted as the result of workflow w

val int_dep : int workflow -> template

int_dep w is interpreted as result of workflow w

val quote : ?using:char -> template -> template

quote ~using:c t surrounds template t with character c

val option : ('a -> template) -> 'a option -> template

option f o is f x if o = Some x and string "" otherwise

val list : ('a -> template) -> ?sep:string -> 'a list -> template

list combinator, optional value of sep is ","

val seq : ?sep:string -> template list -> template

another list combinator, default value for sep is ""

val enum : ('a * string) list -> 'a -> template

combinator for enumerations

val file_dump : template -> template

file_dump t can be used when a command needs a configuration script: at run-time, it will generate a text using t, save it to a path, deterministically chosen as a function of t. Finally the template file_dump t is interpreted as this path.

OCaml

Innovation. Community. Security.