Module Theory.Compiler

Information about the compiler.

A compiler is a translator that was used to translate the code in this unit from the source to the target representation.

include Base.Comparable.S with type t = compiler
type t = compiler
val (>=) : t -> t -> bool
val (<=) : t -> t -> bool
val (=) : t -> t -> bool
val (>) : t -> t -> bool
val (<) : t -> t -> bool
val (<>) : t -> t -> bool
val equal : t -> t -> bool
val compare : t -> t -> int
val min : t -> t -> t
val max : t -> t -> t
val ascending : t -> t -> int
val descending : t -> t -> int
val between : t -> low:t -> high:t -> bool
val clamp_exn : t -> min:t -> max:t -> t
val clamp : t -> min:t -> max:t -> t Base__.Or_error.t
type comparator_witness
val comparator : (t, comparator_witness) Base__.Comparator.comparator
val validate_lbound : min:t Base__.Maybe_bound.t -> t Base__.Validate.check
val validate_ubound : max:t Base__.Maybe_bound.t -> t Base__.Validate.check
val validate_bound : min:t Base__.Maybe_bound.t -> max:t Base__.Maybe_bound.t -> t Base__.Validate.check
include Core_kernel.Binable.S with type t := t
val bin_size_t : t Bin_prot.Size.sizer
val bin_write_t : t Bin_prot.Write.writer
val bin_read_t : t Bin_prot.Read.reader
val __bin_read_t__ : (int -> t) Bin_prot.Read.reader
val bin_shape_t : Bin_prot.Shape.t
val bin_writer_t : t Bin_prot.Type_class.writer
val bin_reader_t : t Bin_prot.Type_class.reader
val bin_t : t Bin_prot.Type_class.t
include Core_kernel.Pretty_printer.S with type t := t
val pp : Base__.Formatter.t -> t -> unit
val create : ?specs:(string * string) list -> ?version:string list -> ?options:string list -> string -> compiler

declare name declares a compiler.

The compiler here represents more of a process that compiled the unit rather than a specific program, thus it includes the configuration parameters and command-line options.

val name : compiler -> string

name compiler returns the compiler name.

  • since 2.5.0
val version : compiler -> string list

version the compiler version.

The least specific (aka major) version comes first in the list, with more detailed versions added after. The exact meaning of the version consituents is specific to the compiler.

val options : compiler -> string list

options the list of options that were used to compile the unit.

Options are specified as a list of command-line options with possible repetitions. The meaning of the options is specific to the compiler.

Note, that options are the options passed to the compiler when this compilation unit was compiled from the source, not the options of the compiler itsef, for the latter see specs.

val specs : compiler -> string Core_kernel.Map.M(Core_kernel.String).t

specs the configuration of the compiler.

A key-value storage of the configuration parameters of the compiler itself.

val to_string : compiler -> string

is the textual representation of the compiler descriptor