package opam-lib

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

Compiler names and versions

module Version : sig ... end

OCaml compiler versions

Compiler names

include OpamMisc.ABSTRACT
type t

ABSTRACT type

val of_string : string -> t

Create an abstract value from a string

val to_string : t -> string

Convert an abstract value to a string

val to_json : t -> OpamJson.t

Convert an abstract value to a JSON object

module Set : OpamMisc.SET with type elt = t
module Map : OpamMisc.MAP with type key = t
val version : t -> Version.t

Return the compiler version

val get_current : unit -> t option

Return the current compiler at its currently installed version

val get_system : unit -> t option

Return the system compiler at is current version. Warning, this is different from system which is a static string with version "system"

val of_filename : OpamFilename.t -> t option

Convert a filename into a compiler name. This function extract name from /path/to/$name.comp.

List the compiler available in the global state.

val prefixes : OpamFilename.Dir.t -> string option Map.t

List the compiler available in a directory (and their prefix)

val system : t

System compiler

val unknown : t -> 'a

Errors

OCaml

Innovation. Community. Security.