package bistro

  1. Overview
  2. Docs

The type representing a set of actions (shell scripts or evaluations of OCaml expressions) to build a target of type 'a. The type 'a is a phantom type, which can be used to enforce static invariants.

type +'a t
val u : _ t -> U.t
val id : _ t -> string
val compare : 'a t -> 'a t -> int
val equal : 'a t -> 'a t -> bool
val to_dep : _ t -> dep
val of_fun : ?descr:string -> ?mem:int -> ?np:int -> ?version:int -> id:id -> deps:U.t list -> (env -> unit) -> 'a t

of_fun ~id ~f ~deps () builds a workflow step by executing f. f is passed an env object that can be asked where to find dependencies in the cache and where to put the result. id is a string uniquely identifying f and deps is the list of workflows that will be used during the evaluation of f.

Other arguments are:

  • @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)

  • @param version

    version number, used to force the rebuild of a workflow

This function is not meant to be used directly because for a given f specifying id and deps manually is error-prone. Use the PPX extension instead.

OCaml

Innovation. Community. Security.