package bistro

  1. Overview
  2. Docs

This module provides an alternative DSL to construct workflows whose action is to evaluate an OCaml expression.

val value : ?descr:string -> ?np:int -> ?mem:int -> 'a expression -> 'a value workflow

value e is a workflow that produces an OCaml value by evaluating e. This value is saved automatically in dest using functions from the Marshal module.

  • @param descr

    description of the workflow, used for logging

  • @param mem

    required memory

  • @param np

    maximum number of cores (could be given less at execution)

val file : ?descr:string -> ?np:int -> ?mem:int -> unit expression -> [_, _] file workflow

Same as value, the expression describes a side-effet which is supposed to create a file at location dest.

val directory : ?descr:string -> ?np:int -> ?mem:int -> unit expression -> _ directory workflow

Same as value, the expression describes a side-effet which is supposed to create a directory at location dest.

val id : 'a -> string

Utility function to compute a digest of any (non-functional) value to a string

val pure : string -> 'a -> 'a expression

pure id x is an expression that evaluate in x. id should uniquely identify x, meaning that no other call to pure should be made with arguments id and y is y is not equal to x.

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

Function application

val ($) : ('a -> 'b) expression -> 'a expression -> 'b expression

Function application (operator style)

val np : int expression

Expression evaluated to the number of cores attributed to the workflow

val dest : string expression

Expression evaluated to the location where the workflow has to store its result

val dep : _ workflow -> string expression

Expression evaluated to the location where the workflow has to store its result

val valdep : 'a value workflow -> 'a expression

valdep w is evaluated to the value produced by the value workflow w

val deps : _ workflow list -> string list expression

Expression for list of dependencies

val valdeps : _ value workflow list -> 'a list expression

Expression for list of dependencies

val int : int -> int expression

Expression for ints

val string : string -> string expression

Expression for strings

val const : ('a -> string) -> 'a -> 'a expression

Expression for constants, given an id function

OCaml

Innovation. Community. Security.