Module B00.Memo

type t
type tool_lookup = t -> B0_std.Cmd.tool -> (B0_std.Fpath.t, string) result B0_std.Fut.t
val tool_lookup_of_os_env : ?sep:string -> ?var:string -> B0_std.Os.Env.t -> tool_lookup
type feedback = [
  1. | `Miss_tool of Tool.t * string
  2. | `Op_complete of B000.Op.t
]
val create : ?clock:B0_std.Os.Mtime.counter -> ?cpu_clock:B0_std.Os.Cpu.Time.counter -> feedback:(feedback -> unit) -> cwd:B0_std.Fpath.t -> ?win_exe:bool -> ?tool_lookup:tool_lookup -> Env.t -> B000.Guard.t -> B000.Reviver.t -> B000.Exec.t -> t
val memo : ?hash_fun:(module B0_std.Hash.T) -> ?win_exe:bool -> ?tool_lookup:tool_lookup -> ?env:B0_std.Os.Env.t -> ?cwd:B0_std.Fpath.t -> ?cache_dir:B0_std.Fpath.t -> ?trash_dir:B0_std.Fpath.t -> ?jobs:int -> ?feedback: ([ `Exec_start of B0_std.Os.Cmd.pid option * B000.Op.t | `Miss_tool of Tool.t * string | `Op_complete of B000.Op.t ] -> unit) -> unit -> (t, string) result
val clock : t -> B0_std.Os.Mtime.counter
val cpu_clock : t -> B0_std.Os.Cpu.Time.counter
val win_exe : t -> bool
val tool_lookup : t -> tool_lookup
val env : t -> Env.t
val reviver : t -> B000.Reviver.t
val guard : t -> B000.Guard.t
val exec : t -> B000.Exec.t
val trash : t -> B000.Trash.t
val has_failures : t -> bool
val hash_string : t -> string -> B0_std.Hash.t
val hash_file : t -> B0_std.Fpath.t -> (B0_std.Hash.t, string) result
val stir : block:bool -> t -> unit
val status : t -> (unit, B000.Op.aggregate_error) result
val delete_trash : block:bool -> t -> (unit, string) result
val ops : t -> B000.Op.t list
val mark : t -> string
val with_mark : t -> string -> t
val run_proc : t -> (unit -> unit B0_std.Fut.t) -> unit
val fail : t -> ('a, Format.formatter, unit, 'b) format4 -> 'a
val fail_if_error : t -> ('a, string) result -> 'a
val notify : ?k:(unit -> unit) -> t -> [ `End | `Fail | `Info | `Start | `Warn ] -> ('a, Format.formatter, unit, unit) format4 -> 'a
val notify_if_error : t -> [ `End | `Fail | `Info | `Start | `Warn ] -> use:'a -> ('a, string) result -> 'a
val file_ready : t -> B0_std.Fpath.t -> unit
val read : t -> B0_std.Fpath.t -> string B0_std.Fut.t
val write : t -> ?stamp:string -> ?reads:B0_std.Fpath.t list -> ?mode:int -> B0_std.Fpath.t -> (unit -> (string, string) result) -> unit
val copy : t -> ?mode:int -> ?linenum:int -> src:B0_std.Fpath.t -> B0_std.Fpath.t -> unit
val mkdir : t -> ?mode:int -> B0_std.Fpath.t -> unit B0_std.Fut.t
val delete : t -> B0_std.Fpath.t -> unit B0_std.Fut.t
val wait_files : t -> B0_std.Fpath.t list -> unit B0_std.Fut.t
type cmd
type tool
val tool : t -> Tool.t -> B0_std.Cmd.t -> cmd
val tool_opt : t -> Tool.t -> (B0_std.Cmd.t -> cmd) option B0_std.Fut.t
val spawn : t -> ?stamp:string -> ?reads:B0_std.Fpath.t list -> ?writes:B0_std.Fpath.t list -> ?env:B0_std.Os.Env.t -> ?cwd:B0_std.Fpath.t -> ?stdin:B0_std.Fpath.t -> ?stdout:B000.Op.Spawn.stdo -> ?stderr:B000.Op.Spawn.stdo -> ?success_exits:B000.Op.Spawn.success_exits -> ?post_exec:(B000.Op.t -> unit) -> ?k:(int -> unit) -> cmd -> unit
val spawn' : t -> ?stamp:string -> ?reads:B0_std.Fpath.t list -> writes_root:B0_std.Fpath.t -> ?writes:(B000.Op.t -> B0_std.Fpath.t list) -> ?env:B0_std.Os.Env.t -> ?cwd:B0_std.Fpath.t -> ?stdin:B0_std.Fpath.t -> ?stdout:B000.Op.Spawn.stdo -> ?stderr:B000.Op.Spawn.stdo -> ?success_exits:B000.Op.Spawn.success_exits -> ?k:(int -> unit) -> cmd -> unit