package b0
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha512=00a6868b4dfa34565d0141b335622a81a0e8d5b9e3c6dfad025dabfa3df2db2a1302b492953bbbce30c3a4406c324fcec25250a00b38f6d18a69e15605e3b07e
doc/b0/B0_pack/index.html
Module B0_packSource
Build packs.
A build pack gathers a set of build units and attaches metadata to it.
Packs
The type for build units.
v n us is a build pack named n made of build units us and described by doc. locked defaults to false, see locked for the semantics.
locked is true if the pack when used in a build mandates a locked build.
B0 definition API
include B0_def.S with type t := t
Named values
define ~doc ~meta n defines name n in the current scope with documentation string doc (defaults to "undocumented")e and metadata meta (defaults to B0_meta.empty). Defining a duplicate value in a scope raises Duplicate.
def_kind is the kind of defined value.
def v is the definition of value v.
Metadata
has_meta k u is B0_meta.mem k (B0_unit.meta u).
find_meta k u is B0_meta.find k (B0_unit.meta u).
get_meta m k u is Ok v if find_meta k u is Some v and a final user friendly error message if None.
Add & Lookup
get n looks up the value named n and errors the B0 file if there no such n.
get_or_suggest n is the value named n or a (possibly empty) list of suggested values whose name could match n.
get_or_hint n is the value named n or an error message that indicates that n could not be found with suggested names.
get_list_or_hint ns are the value named ns or an error that indicates the names that could not be found with suggested names. If empty_means_all is true (defaults to false) an empty ns returns list () sorted by name.
Formatters
pp_name_str v pretty prints value names.
pp_name v formats v's name.
pp_doc formats v's doc string.
pp_synopsis formats v's name and its doc string.
pp formats v 's name, its doc string and its metadata dictionary.