package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dba2fc571f39f3b8e87ee55c77bdec7ec6a5ddc7d99b8b20aeda848af546be04
md5=51ee1d66acc4d7f87bdceac1341b7711
doc/b0.b0/B0_def/Make/index.html
Module B0_def.Make
Make (V)
names the values of V
.
Parameters
Signature
Named values
type t = V.t
The type of defined 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
.
val name : t -> string
name v
is v
's name.
val doc : t -> string
doc v
is v
's documentation string.
Add & Lookup
val add : t -> unit
add v
adds the value v
to the list of defined values.
val list : unit -> t list
list ()
is the list of units. FIXME scope that.
val find : string -> t option
find n
is the value named n
(if any).
val get : string -> t
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_all ns
are the value named ns
or an error that indicates the names that could not be found with suggested names. If ns
is empty then list
is returned.
Formatters
val pp_name_str : string B00_std.Fmt.t
pp_name_str v
pretty prints value names.
val pp_name : t B00_std.Fmt.t
pp_name v
formats v
's name.
val pp_doc : t B00_std.Fmt.t
pp_doc
formats v
's doc string.
val pp_synopsis : t B00_std.Fmt.t
pp_synopsis
formats v
's name and its doc string.
val pp : t B00_std.Fmt.t
pp
formats v
's name, its doc string and its metadata dictionary.