Module B0_memo_cli.Hash

B0_hash interaction.

Ideally this would be in B0_std_cli since this is where B0_hash is. But since we vendor the former from more. We have that here.

val get_hash_fun : hash_fun:(module B0_hash.T) option -> (module B0_hash.T)

get_hash_fun ~hash_func determines a hash function. If hash_fun is None then B0_std.Hash is used.

val hash_fun : ?opts:string list -> ?docs:string -> ?doc:string -> ?doc_none:string -> ?env:Cmdliner.Cmd.Env.info -> unit -> (module B0_hash.T) option Cmdliner.Term.t

hash_func is a cli interface for specfiying hash function used for caching.

  • opts are the cli options to specify it, defaults to ["hash-fun"].
  • docs is where the option is documented, defaults to Cmdliner.Manpage.s_common_options
  • doc is a doc string.
  • doc_none describes how the value is determined if the term is evaluates to None.
  • env is a variable that can be used to override the default value, defaults to hash_fun_env.
val hash_fun_var : Cmdliner.Cmd.Env.info

hash_fun_var is "B0_HASH_FUN".