package opam-format

  1. Overview
  2. Docs

Module OpamSwitchSource

The type for switch names

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

System switch name

Sourceval 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

Sourceval external_dirname : string

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

Sourceval 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.