B0_metaMetadata.
Typed key-value dictionaries. These dictionaries are attached to various b0 definitions to specify metadata about them.
The module defines a few standard keys.
The recommended way of formatting constant dictionaries is:
open B0_kit.V000 (* Defines the ~~ operator *)
let meta =
B0_meta.empty
|> ~~ B0_meta.authors ["The project programmers"]
|> ~~ B0_meta.homepage "https://example.org"
|> ~~ B0_meta.tag B0_opam.tagmodule Key : sig ... endKeys.
val empty : tempty is the empty metadata.
val is_empty : t -> boolis_empty m is true iff m is empty.
has_tag tag m is the value of tag in m or its default value (that is false for those tags created with Key.make_tag).
Raises Invalid_argument if tag has no default; regardless of whether tag is bound in m.
add_some k o m is m if o is None and m with k bound to v if o is Some v.
add_some_or_default k o m is m with k bound to v if o is Some v and Key.default k otherwise. Raises Invalid_argument if k has no default (regardless of o's value).
add_if_undef k v m is m with k bound to v if k is unbound in m.
override m ~by overrides bindings of m by those by. The result has all the bindings of by and those of m which are not in by.
find_or_default k m is the binding of k in m or the default value of k. Raises Invalid_argument if k has no default; regardless of whether k is bound in m.
get k m is the binding of k in m. Raises Invalid_argument if there is no such binding. This does not lookup the default of k.
find_binding k m is the binding for k in m (if any).
find_binding_by_name n m is the binding named n in m (if any).
find_binding k m is the binding for k in m. Raises Invalid_argument if there is no such binding.
get_binding_by_name n m is the binding named n in m. Raises Invalid_argument if there is no such binding.
val pp_binding : binding B0_std.Fmt.tpp_binding formats a binding using B0_std.Fmt.field and the key's value formatter.
fold f m acc folds f over the bindings of m starting with acc.
val pp : t B0_std.Fmt.tpp formats metadata using pp_binding.
val pp_non_empty : t B0_std.Fmt.tpp_non_empty is B0_std.Fmt.cut followed by pp if metadata is non empty and B0_std.Fmt.nop otherwise.
val authors : string list keyauthors describes a list of persons with authorship.
val description_tags : string list keydescription_tags describes a list of classification tags used for documentation.
val description : string keydescription is a long description for the entity.
val homepage : string keyhomepage is an URL to a project homepage.
val issues : string keyissues is an URL to an issue tracker.
The type for SPDX license identifiers. If your license is not in the list you can use anything if prefixed by "LicenseRef-".
licenses describes a list of licenses. Some processors like file generators consider the first license of this list to be the main license of your project and use it accordingly.
val maintainers : string list keymaintainers describe a list of persons with maintainership.
val online_doc : string keyonline_doc is an URL to online documentation.
val repo : string keyrepo is an URL to a VCS repository.
val synopsis : string keysynopsis is a one line synopsis for an entity.
val bench : bool keybench tags benchmarking entities. Defaults to false.
val build : bool keybuild tags build system entities. Defaults to false.
val deprecated : bool keydeprecated tags deprectated entities. Defaults to false.
val dev : bool keydev tags development entities. Defaults to false.
val doc : bool keydoc tags documentation entities. Defaults to false.
val exe : bool keyexe tags executable entities. Defaults to false.
val test : bool keytest tags testing entities. Defaults to false.
val lib : bool keylib tags library entities. Defaults to false.
val long : bool keylong tags entities associated with a lengthy process. Defaults to false.
val public : bool keypublic indicates if an entity is public. Defaults to false. The semantics depends on the context but it usually means that it exports the entity in an underlying global namespace.
val run : bool keyrun tags entities that should be run in a particular context. Defaults to false.
val sample : bool keysample tags entities that exist for demonstration purposes.
val warning : string keywarning is a warning output on entity usage.