package opam-format

  1. Overview
  2. Docs

The type for switch names

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
val unset : t

System switch name

val is_external : t -> bool

Determines wether this switch is internal (bound to a prefix within the opam root) or living somewhere else, in which case its prefix dir is inferred from its name using get_root

Returns the root directory of the switch with the given name, assuming the given opam root

val external_dirname : string

The relative dirname in which the opam switch prefix sits for external switches ("_opam")

val of_dirname : OpamFilename.Dir.t -> t

Returns an external switch handle from a directory name. Resolves to the destination if external_dirname at the given dir is a symlink to another external_dirname.

OCaml

Innovation. Community. Security.