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.
val id : _ t ‑> string
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:
Parameter descr: description of the workflow, used for logging
Parameter mem: required memory
Parameter np: maximum number of cores (could be given less at execution)
Parameter 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.