X-Git-Url: http://git.annexia.org/?p=whenjobs.git;a=blobdiff_plain;f=lib%2Fwhenutils.mli;h=4d5ccc7bed7c4c166394004ea9bef09e38dc071f;hp=13bc68c57d69e2c5356d4b6a2d855fda0a8c8028;hb=df2cdcfdc29af0080b9b3eace17325d2a1d83e72;hpb=2701d3a832514ee94d110dfbd4f46f2ab6d9637e diff --git a/lib/whenutils.mli b/lib/whenutils.mli index 13bc68c..4d5ccc7 100644 --- a/lib/whenutils.mli +++ b/lib/whenutils.mli @@ -183,9 +183,6 @@ type variables = variable StringMap.t type job_private (** Private state associated with a job, used for evaluation. *) -val no_job_private : job_private -(* XXX any use of no_job_private is wrong XXX *) - type job_cond = | When_job of whenexpr (** when ... : << >> *) | Every_job of periodexpr (** every ... : << >> *) @@ -197,7 +194,15 @@ type job = { job_script : shell_script; job_private : job_private; } -(** A job. *) +(** A job. Note that because of the [job_private] field, these cannot + be constructed directly. Use {!make_when_job} or {!make_every_job} + to construct one. *) + +val make_when_job : Camlp4.PreCast.Loc.t -> string -> whenexpr -> shell_script -> job +(** Make a when-statement job. *) + +val make_every_job : Camlp4.PreCast.Loc.t -> string -> periodexpr -> shell_script -> job +(** Make an every-statement job. *) val expr_of_ast : Camlp4.PreCast.Ast.Loc.t -> Camlp4.PreCast.Ast.expr -> whenexpr (** Convert OCaml AST to an expression. Since OCaml ASTs are much