package ocaml-version

  1. Overview
  2. Docs

Configuration parameters that affect the behaviour of OCaml at compiler-build-time.

type o = [
  1. | `Afl
  2. | `Default_unsafe_string
  3. | `Disable_flat_float_array
  4. | `Flambda
  5. | `Force_safe_string
  6. | `Frame_pointer
  7. | `No_naked_pointers
]

Configuration options available at compiler build time.

val to_string : o -> string

to_string o returns a compact representation of o suitable for use in opam version strings.

val of_string : string -> o option

of_string s will parse the output of to_string back into an option o. Returns None if the string input is unknown.

val of_t : t -> (o list, [> `Msg of string ]) Stdlib.result

of_t t will parse the extra field of t and return a list of configure options that it represents. Unknown options in the extra field will result in an Error being returned.

val to_t : t -> o list -> t
val to_description : o -> string

to_description o returns a human-readable representation of o.

val to_configure_flag : t -> o -> string

to_configure_flag o returns a string that can be passed to OCaml's configure script to activate that feature.

val compare : o -> o -> int

compare a b will return -1 if a is < b, 0 if they are equal, or 1 if a > b. For backwards compatibility reasons, `Frame_pointer always comes first in comparisons.

val equal : o -> o -> bool

equal a b will return true if a=b

OCaml

Innovation. Community. Security.