package opam-format

  1. Overview
  2. Docs

Module OpamFile.InitConfigSource

Init config file /etc/opamrc

include IO_FILE
Sourcetype t

File contents

Sourceval format_version : OpamVersion.t
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
Sourceval opam_version : t -> OpamTypes.opam_version
Sourceval default_compiler : t -> OpamTypes.formula
Sourceval default_invariant : t -> OpamTypes.formula
Sourceval jobs : t -> int option
Sourceval dl_tool : t -> OpamTypes.arg list option
Sourceval dl_jobs : t -> int option
Sourceval dl_cache : t -> OpamTypes.url list
Sourceval solver_criteria : t -> (OpamTypes.solver_criteria * string) list
Sourceval solver : t -> OpamTypes.arg list option
Sourceval wrappers : t -> Wrappers.t
Sourceval global_variables : t -> (OpamTypes.variable * OpamTypes.variable_contents * string) list
Sourceval eval_variables : t -> (OpamTypes.variable * string list * string) list
Sourceval required_tools : t -> (string list * string option * OpamTypes.filter option) list
Sourceval init_scripts : t -> ((string * string) * OpamTypes.filter option) list
Sourceval sys_pkg_manager_cmd : t -> OpamTypes.filename OpamStd.String.Map.t
Sourceval git_location : t -> OpamTypes.dirname option
Sourceval with_opam_version : OpamTypes.opam_version -> t -> t
Sourceval with_repositories : (OpamTypes.repository_name * (OpamTypes.url * OpamTypes.trust_anchors option)) list -> t -> t
Sourceval with_default_compiler : OpamTypes.formula -> t -> t
Sourceval with_default_invariant : OpamTypes.formula -> t -> t
Sourceval with_jobs : int option -> t -> t
Sourceval with_dl_tool : OpamTypes.arg list option -> t -> t
Sourceval with_dl_jobs : int option -> t -> t
Sourceval with_dl_cache : OpamTypes.url list -> t -> t
Sourceval with_solver_criteria : (OpamTypes.solver_criteria * string) list -> t -> t
Sourceval with_solver : OpamTypes.arg list option -> t -> t
Sourceval with_wrappers : Wrappers.t -> t -> t
Sourceval with_global_variables : (OpamTypes.variable * OpamTypes.variable_contents * string) list -> t -> t
Sourceval with_eval_variables : (OpamTypes.variable * string list * string) list -> t -> t
Sourceval with_required_tools : (string list * string option * OpamTypes.filter option) list -> t -> t
Sourceval with_init_scripts : ((string * string) * OpamTypes.filter option) list -> t -> t
Sourceval 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.