Rule.t supports the description of build-rules in jenga.
Two varieties:
Alias.t to stand for some dependencies.Action.t.An alias-rule is constructed by alias of which default is a useful special case.
A target-rule is constructed by create.
Target-rule.t allows the description of dynamic build rules: Although the targets
must be static, the dependencies and action may be contingent on further dependencies.
This is achieved by constructing a target-rule from a value of type: Action.t Dep.t
Make-style rule-triples are a trivial special case, and can be constructed using the
convenience wrapper simple, defined as:
let simple ~targets ~deps ~action = create ~targets ( Dep.all_unit deps *>>| fun () -> action )
module Target_rule : sig ... endinclude sig ... endval sexp_of_t : t ‑> Sexplib.Sexp.tval targets : t ‑> Jenga_lib.Path.Rel.t listval alias : Jenga_lib.Alias.t ‑> unit Jenga_lib.Dep.t list ‑> tval default : dir:Jenga_lib.Path.t ‑> unit Jenga_lib.Dep.t list ‑> tval create : targets:Jenga_lib.Path.t list ‑> Jenga_lib.Action.t Jenga_lib.Dep.t ‑> tval simple : targets:Jenga_lib.Path.t list ‑> deps:unit Jenga_lib.Dep.t list ‑> action:Jenga_lib.Action.t ‑> t