package opam-format

  1. Overview
  2. Docs

Module OpamVariable.FullSource

Fully qualified variable.

include OpamStd.ABSTRACT
Sourcetype t
Sourceval compare : t -> t -> int
Sourceval equal : t -> t -> bool
Sourceval of_string : string -> t
Sourceval to_string : t -> string
Sourcemodule Set : OpamStd.SET with type elt = t
Sourcemodule Map : OpamStd.MAP with type key = t
Sourcetype scope =
  1. | Global
    (*

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

    *)
  2. | Self
    (*

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

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

    pkgname:varname

    *)
Sourceval scope : t -> scope

Returns the scope of the variable

Sourceval variable : t -> variable

Returns the unqualified variable name

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

Return the package corresponding to the scope of the variable

Create a variable local for a given library/syntax extension

Sourceval global : variable -> t

Create a global variable

Sourceval self : variable -> t

Create a variable in the Self scope

Sourceval 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

OCaml

Innovation. Community. Security.