package opam-format

  1. Overview
  2. Docs

Module OpamFile.CompSource

Compiler version $opam/compilers/. Deprecated, only used to upgrade old data

include IO_FILE
Sourcetype t

File contents

Sourceval empty : t

Empty file

Sourceval write : t typed_file -> t -> unit

Write some contents to a file

Sourceval read : t typed_file -> t

Read file contents. Raise an error if the file does not exist.

Sourceval read_opt : t typed_file -> t option

Returns None on non-existing file

Sourceval safe_read : t typed_file -> t

Read file contents. Return empty if the file does not exist.

Sourceval read_from_channel : ?filename:t typed_file -> in_channel -> t
Sourceval read_from_string : ?filename:t typed_file -> string -> t
Sourceval write_to_channel : ?filename:t typed_file -> out_channel -> t -> unit
Sourceval write_to_string : ?filename:t typed_file -> t -> string
Sourcetype compiler = string
Sourcetype compiler_version = string
Sourceval create_preinstalled : compiler -> compiler_version -> OpamTypes.name list -> OpamTypes.env_update list -> t

Create a pre-installed compiler description file

Sourceval preinstalled : t -> bool

Is it a pre-installed compiler description file

Sourceval opam_version : t -> OpamTypes.opam_version

Get OPAM version

Sourceval name : t -> compiler

Return the compiler name

Sourceval version : t -> compiler_version

Return the compiler version

Sourceval src : t -> OpamTypes.url option

Return the url of the compiler

Sourceval patches : t -> OpamTypes.url list

Return the list of patches to apply

Sourceval configure : t -> string list

Options to give to the "./configure" command

Sourceval make : t -> string list

Options to give to the "make" command

Sourceval build : t -> OpamTypes.command list

Options to give to build the package. If this one is provided, nothing should be specified for configure and make.

Sourceval packages : t -> OpamTypes.formula

Packages to install immediately after the creation of OCaml

Sourceval env : t -> OpamTypes.env_update list

Environment variable to set-up before running commands in the subtree

Sourceval tags : t -> string list
Sourceval with_src : OpamTypes.url option -> t -> t
Sourceval with_patches : OpamTypes.url list -> t -> t
Sourceval with_configure : string list -> t -> t
Sourceval with_make : string list -> t -> t
Sourceval with_build : OpamTypes.command list -> t -> t
Sourceval with_packages : OpamTypes.formula -> t -> t
Sourceval to_package : ?package:OpamTypes.package -> t -> Descr.t option -> OPAM.t

Converts a compiler definition to package metadata. For compat. If package is unspecified, a package named "ocaml" is created for "standard" compilers (when the compiler name doesn't contain a "+" and is equal to the compiler version); otherwise, a package "ocaml-VARIANT" is created with "VARIANT" the part of the compiler name on the right of the "+". In both case, the version corresponds to the OCaml version and is version comp.

OCaml

Innovation. Community. Security.