Module type B0.Def.S_DEF

module type S_DEF = sig .. end
Like B0.Def.S but with access to underlying B0.Def.def.

include B0.Def.S
val def : ?loc:B0.Def.loc -> ?doc:string -> string -> B0.Def.def
def ~loc ~doc n is a definition named n at location loc with documentation string doc (defaults to "Undocumented."). loc default to B0.Def.Loc.none.

The resulting definition is guaranteed to have a unique name and this name won't be reused as long as it is B0.Def.S_DEF.def_added to the index.

A warning is issued if the definition had to be renamed.

WARNING. loc must be different from B0.Def.Loc.none if and only if the current source is B0.Def.Loc.none or Invalid_argument is raised. FIXME should we rather log & ignore ?

val def_add : B0.Def.t -> unit
def_add v adds v's definition to the underlying index.
val def_rem : B0.Def.t -> unit
def_rem v removes v's definition from the underlying index.