package b0
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=dba2fc571f39f3b8e87ee55c77bdec7ec6a5ddc7d99b8b20aeda848af546be04
md5=51ee1d66acc4d7f87bdceac1341b7711
doc/b0.b0/B0_def/index.html
Module B0_def
B0 definitions.
B0 definitions are uniquely named OCaml values of different types used for describing software construction. The value names are used for end-user interaction.
B0 definitions occur in various B0 files and libraries during the module initialisation phase of the program consuming the definitions. After the module initialisation phase no new definition is allowed.
This module handle the management of these named values in B0 files and libraries. It provides the infrastructure to track the location of their definition, properly scope the names, check their unicity in the scope, index them and make sure they cannot be defined after the module initialisation phase of the program.
Definitions
module Scope : sig ... end
Scopes are used to track and scope B0 definitions created by libraries and B0 files.
val file : t -> B00_std.Fpath.t option
file d
is the absolute file path in which d
is defined, if defined in a file.
val dir : t -> B00_std.Fpath.t option
dir
is the parent of file d
.
val name : t -> string
name d
is the qualified name of d
.
val doc : t -> string
doc d
is a one-line documentation string for d
.
Exception thrown if a definition error occurs. This can be due to
- Duplicate name.
- Malformed name.
The argument is an error message to print as is. The backtrace should point to the redefinition (it is unfortunately difficult to keep track of the previous definition).
Defining values
module type VALUE = sig ... end
The type for values to be named.
module type S = sig ... end
The type of named values.