Module Resource.Cache


module Cache: sig .. end

val clean : unit -> unit

type knowledge =
| Yes
| No
| Unknown
type suspension = Command.t * (unit -> unit) 

type build_status =
| Bbuilt
| Bcannot_be_built
| Bnot_built_yet
| Bsuspension of suspension

type cache_entry = {
   mutable built : build_status;
   mutable changed : knowledge;
   mutable dependencies : Resource.Resources.t;
}
val empty : unit -> cache_entry
val print_knowledge : Format.formatter -> knowledge -> unit
val print_build_status : Format.formatter -> build_status -> unit
val print_cache_entry : Format.formatter -> cache_entry -> unit
val cache : (Pathname.t, cache_entry) Hashtbl.t
val get : Pathname.t -> cache_entry
val fold_cache : (Pathname.t -> cache_entry -> 'a -> 'a) -> 'a -> 'a
val print_cache : Format.formatter -> unit -> unit
val print_graph : Format.formatter -> unit -> unit
val resource_changed : Pathname.t -> unit
val external_is_up_to_date : string -> bool
val source_is_up_to_date : string -> Pathname.t -> bool
val prod_is_up_to_date : Pathname.t -> bool
val resource_has_changed : Pathname.t -> bool
val resource_state : Pathname.t -> build_status
val resource_built : Pathname.t -> unit
val resource_failed : Pathname.t -> unit
val import_in_build_dir : Pathname.t -> unit
val suspend_resource : Pathname.t -> Command.t -> (unit -> 'a) -> Pathname.t list -> unit
val resume_suspension : Command.t * (unit -> 'a) -> 'a
val resume_resource : Pathname.t -> unit
val get_optional_resource_suspension : Pathname.t -> suspension option
val clear_resource_failed : Pathname.t -> unit
val dependencies : Pathname.t -> Resource.Resources.t
val fold_dependencies : (Pathname.t -> Resource.Resources.elt -> 'a -> 'a) -> 'a -> 'a
val add_dependency : Pathname.t -> Resource.Resources.elt -> unit
val print_dependencies : Format.formatter -> unit -> unit