package ocaml-version

  1. Overview
  2. Docs

Module Ocaml_version.OpamSource

Opam compiler switches. These are available from the public opam-repository.

Sourceval variants : t -> string list

variants t lists the compiler variants that are available in opam for t strings. This is returned as a string that can be passed to with_variant to form a full version (or use switches as a convenience).

Sourceval default_variant : t -> string option

default_variant t returns Some v if a variant exists by default for version t. This is typically true for development versions of the compiler that have a branch name such as trunk appended to their switch name. default_switch combines this into a full OCaml version.

Sourceval default_switch : t -> t

default_switch t is the name of the switch of the stock version of t. This is normally just the version number, but can include an extra version string such as trunk for development versions of the compiler.

Sourceval switches : t -> t list

switches t lists all the available opam switches for compiler version t. This list includes the default compiler, and any available variants such as flambda.

Sourceval variant_switches : t -> t list

variant_switches t lists all the non-default switch versions available for compiler version t. This filters out the default variant of the compiler.

Sourcemodule V2 : sig ... end

Opam 2.0 functions