ocaml-version

The ocaml-version library provides facilities to parse version numbers of the OCaml compiler, and enumerates the various official OCaml releases and configuration variants.

OCaml version numbers are of the form major.minor.patch+extra, where the patch and extra fields are optional. This library offers the following functionality:

  • Functions to parse and serialize OCaml compiler version numbers
  • Enumeration of official OCaml compiler version releases
  • Test compiler versions for a particular feature (e.g. the bytes type)
  • opam compiler switch enumeration