Module Rule


module Rule: sig .. end

module Resources: Resource.Resources
exception Exit_rule_error of string
exception Failed
type env = Pathname.t -> Pathname.t 
type builder = Pathname.t list list -> (Pathname.t, exn) My_std.Outcome.t list 
type action = env -> builder -> Command.t 

type digest_command = {
   digest : string;
   command : Command.t;
}
type 'a gen_rule = {
   name : string;
   tags : Tags.t;
   deps : Pathname.t list;
   prods : 'a list;
   stamp : 'a option;
   code : env -> builder -> digest_command;
}
type rule = Pathname.t gen_rule 
type rule_scheme = Resource.resource_pattern gen_rule 
val name_of_rule : 'a gen_rule -> string
val deps_of_rule : 'a gen_rule -> Pathname.t list
val prods_of_rule : 'a gen_rule -> 'a list
val stamp_of_rule : 'a gen_rule -> 'a option
type 'a rule_printer = (Format.formatter -> 'a -> unit) ->
Format.formatter -> 'a gen_rule -> unit
val compare : 'a -> 'b -> 'c
val print_rule_name : Format.formatter -> 'a gen_rule -> unit
val print_resource_list : Format.formatter -> Pathname.t list -> unit
val print_rule_contents : (Format.formatter -> 'a -> 'b) ->
Format.formatter -> 'a gen_rule -> unit
val pretty_print : (Format.formatter -> 'a -> 'b) ->
Format.formatter -> 'a gen_rule -> unit
val print : Format.formatter -> 'a gen_rule -> unit
val subst : Resource.env ->
Resource.resource_pattern gen_rule -> Pathname.t gen_rule
exception Can_produce of rule
val can_produce : Pathname.t -> Resource.resource_pattern gen_rule -> rule option
val digest_prods : Pathname.t gen_rule -> (string * My_std.Digest.t) list
val digest_deps : 'a gen_rule -> Resources.t -> string
val digest_rule : Pathname.t gen_rule ->
Resources.t -> digest_command -> My_std.Digest.t
val cached_digest : 'a gen_rule -> string option
val store_digest : 'a gen_rule -> string -> unit
val print_digest : Format.formatter -> My_std.Digest.t -> unit
val exists2 : ('a -> 'b -> 'c) -> 'a -> 'b -> 'c option
val build_deps_of_tags : (Command.pathname list list -> ('a, exn) My_std.Outcome.t list) ->
Tags.t -> 'a list
val build_deps_of_tags_on_cmd : (Command.pathname list list -> ('a, exn) My_std.Outcome.t list) ->
Command.t -> unit
val call : (Command.pathname list list -> (Pathname.t, exn) My_std.Outcome.t list) ->
Pathname.t gen_rule -> unit
val rule : string ->
?tags:Tags.elt list ->
?prods:string list ->
?deps:string list ->
?prod:string ->
?dep:string ->
?stamp:string ->
?insert:[ `after of string | `before of string | `bottom | `top ] ->
(env -> builder -> Command.t) -> unit
module Common_commands: sig .. end
val copy_rule : string ->
?insert:[ `after of string | `before of string | `bottom | `top ] ->
Pathname.t -> Pathname.t -> unit