Module OpamVariable.Full

Fully qualified variable.

include OpamStd.ABSTRACT
type t
val of_string : string -> t
val to_string : t -> string
val to_json : t -> OpamJson.t
val of_json : OpamJson.t -> t option
module Set : OpamStd.SET with type elt = t
module Map : OpamStd.MAP with type key = t
type scope =
| Global(*

Note: this is attributed to unqualified variables, and may also design self-referring ones

*)
| Self(*

Variable in a package-specific file referring to that package _:varname

*)
| Package of OpamPackage.Name.t(*

pkgname:varname

*)
val scope : t -> scope

Returns the scope of the variable

val variable : t -> variable

Returns the unqualified variable name

val is_global : t -> bool
val package : ?self:OpamPackage.Name.t -> t -> OpamPackage.Name.t option

Return the package corresponding to the scope of the variable

val create : OpamPackage.Name.t -> variable -> t

Create a variable local for a given library/syntax extension

val global : variable -> t

Create a global variable

val self : variable -> t

Create a variable in the Self scope

val read_from_env : t -> variable_contents option

Looks up for an environment override through the environment, by means of OPAMVAR_glovar or OPAMVAR_pkg_pkgvar