package opam-lib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Fully qualified variable.

include OpamStd.ABSTRACT
type t
val of_string : string -> t
val to_string : t -> string
val to_json : t -> OpamJson.t
module Set : OpamStd.SET with type elt = t
module Map : OpamStd.MAP with type key = t
type 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

    *)
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