package opam-format

  1. Overview
  2. Docs

Init config file /etc/opamrc

include IO_FILE
type t

File contents

val format_version : OpamVersion.t
val empty : t

Empty file

val write : t typed_file -> t -> unit

Write some contents to a file

val read : t typed_file -> t

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

val read_opt : t typed_file -> t option

Returns None on non-existing file

val safe_read : t typed_file -> t

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

val read_from_channel : ?filename:t typed_file -> Stdlib.in_channel -> t
val read_from_string : ?filename:t typed_file -> string -> t
val write_to_channel : ?filename:t typed_file -> Stdlib.out_channel -> t -> unit
val write_to_string : ?filename:t typed_file -> t -> string
val opam_version : t -> OpamTypes.opam_version
val repositories : t -> (OpamTypes.repository_name * (OpamTypes.url * OpamTypes.trust_anchors option)) list
val default_compiler : t -> OpamTypes.formula
val default_invariant : t -> OpamTypes.formula
val jobs : t -> int option
val dl_tool : t -> OpamTypes.arg list option
val dl_jobs : t -> int option
val dl_cache : t -> OpamTypes.url list
val solver_criteria : t -> (OpamTypes.solver_criteria * string) list
val solver : t -> OpamTypes.arg list option
val wrappers : t -> Wrappers.t
val global_variables : t -> (OpamTypes.variable * OpamTypes.variable_contents * string) list
val eval_variables : t -> (OpamTypes.variable * string list * string) list
val required_tools : t -> (string list * string option * OpamTypes.filter option) list
val init_scripts : t -> ((string * string) * OpamTypes.filter option) list
val sys_pkg_manager_cmd : t -> OpamTypes.filename OpamStd.String.Map.t
val git_location : t -> OpamTypes.dirname option
val with_opam_version : OpamTypes.opam_version -> t -> t
val with_repositories : (OpamTypes.repository_name * (OpamTypes.url * OpamTypes.trust_anchors option)) list -> t -> t
val with_default_compiler : OpamTypes.formula -> t -> t
val with_default_invariant : OpamTypes.formula -> t -> t
val with_jobs : int option -> t -> t
val with_dl_tool : OpamTypes.arg list option -> t -> t
val with_dl_jobs : int option -> t -> t
val with_dl_cache : OpamTypes.url list -> t -> t
val with_solver_criteria : (OpamTypes.solver_criteria * string) list -> t -> t
val with_solver : OpamTypes.arg list option -> t -> t
val with_wrappers : Wrappers.t -> t -> t
val with_global_variables : (OpamTypes.variable * OpamTypes.variable_contents * string) list -> t -> t
val with_eval_variables : (OpamTypes.variable * string list * string) list -> t -> t
val with_required_tools : (string list * string option * OpamTypes.filter option) list -> t -> t
val with_init_scripts : ((string * string) * OpamTypes.filter option) list -> t -> t
val add : t -> t -> t

add t1 t2 is t2, with the field values falling back to those of t1 when not set in t2

OCaml

Innovation. Community. Security.