Module type B0.Def.S

module type S = sig .. end
Named value interface.

The module guarantees name unicity and provides indexing and lookup of the named values.


type t 
The type for named values.
val value_kind : string
The kind of value.
val name : t -> string
name v is v's name.
val loc : t -> B0.Def.loc
loc v is v's source.
val doc : t -> string
doc v is v's documentation string.
val equal : t -> t -> bool
equal v0 v1 is true iff v0 and v1 and have the same name.
val compare : t -> t -> int
compare v0 v1 is a total order on values compatible with B0.Def.S.equal.
val compare_by_name : t -> t -> int
compare_by_name v0 v1 totally orders v0 and v1 by name in increasing lexicographical order.
val find : string -> t option
find n is the value named n (if any).
val get : string -> t
get n is like B0.Def.S.find but
Raises Invalid_argument if no value n exists.
val get_or_suggest : string -> (t, string list) Pervasives.result
get_or_suggest n is the value with name n if it exists or a list of suggested values whose name could match n.
val list : unit -> t list
list () is the list of existing value lexicographically ordered by increasing value name.

Pretty-printing


val pp_name_str : string B0.Fmt.t
pp_name_str ppf s prints s as if it was a name on ppf.
val pp_name : t B0.Fmt.t
pp_name ppf v prints v's name on ppf.
val pp_synopsis : t B0.Fmt.t
pp_synopsis ppf v prints v's synopsis: its name and documentation.
val pp_info : t B0.Fmt.t
pp_info ppf v prints v's synopsis and fields.
val pp_info_ext : t B0.Fmt.t -> t B0.Fmt.t
pp_info ext ppf v prints v's synopsis and fields extended with ext.