OpamFile.ConfigConfiguration file: $opam/config
include IO_FILEval format_version : OpamVersion.tval empty : tEmpty file
val write : t typed_file -> t -> unitWrite some contents to a file
val read : t typed_file -> tRead file contents.
val read_opt : t typed_file -> t optionReturns None on non-existing file
val safe_read : t typed_file -> tRead file contents. Return empty if the file does not exist.
val read_from_channel : ?filename:t typed_file -> Stdlib.in_channel -> tval read_from_string : ?filename:t typed_file -> string -> tval write_to_channel :
?filename:t typed_file ->
Stdlib.out_channel ->
t ->
unitval write_to_string : ?filename:t typed_file -> t -> stringval root_version : OpamTypes.opam_versionCurrent root version
val with_switch : OpamTypes.switch -> t -> tOCaml switch updates
val with_switch_opt : OpamTypes.switch option -> t -> tval with_installed_switches : OpamTypes.switch list -> t -> tThe list of switches, ordered by most recently used first
val with_repositories : OpamTypes.repository_name list -> t -> tRepository updates
val with_opam_version : OpamVersion.t -> t -> tUpdate opam-version
val with_opam_root_version : OpamVersion.t -> t -> tval with_criteria : (OpamTypes.solver_criteria * string) list -> t -> tval with_solver : OpamTypes.arg list -> t -> tval with_solver_opt : OpamTypes.arg list option -> t -> tval with_dl_tool : OpamTypes.arg list -> t -> tval with_dl_tool_opt : OpamTypes.arg list option -> t -> tval with_dl_cache : OpamTypes.url list -> t -> tval with_wrappers : Wrappers.t -> t -> tval with_global_variables :
(OpamTypes.variable * OpamTypes.variable_contents * string) list ->
t ->
tval with_eval_variables :
(OpamTypes.variable * string list * string) list ->
t ->
tval with_validation_hook_opt : OpamTypes.arg list option -> t -> tval with_default_compiler : OpamTypes.formula -> t -> tval with_default_invariant : OpamTypes.formula -> t -> tval with_depext_bypass : OpamSysPkg.Set.t -> t -> tval with_sys_pkg_manager_cmd :
OpamTypes.filename OpamStd.String.Map.t ->
t ->
tval with_git_location : OpamTypes.dirname -> t -> tval with_git_location_opt : OpamTypes.dirname option -> t -> tval opam_version : t -> OpamTypes.opam_versionReturn the opam version
val opam_root_version : t -> OpamTypes.opam_versionReturn the opam root version, if not defined returns the default version value 2.1~~previous
val opam_root_version_opt : t -> OpamTypes.opam_version optionReturn the opam root version if defined
val repositories : t -> OpamTypes.repository_name listReturn the list of repository
val switch : t -> OpamTypes.switch optionReturn the OCaml switch
val previous_switch : t -> OpamTypes.switch optionval installed_switches : t -> OpamTypes.switch listval jobs : t -> int optionReturn the number of jobs defined
val dl_tool : t -> OpamTypes.arg list optionval dl_jobs : t -> intReturn the number of download jobs
val dl_cache : t -> OpamTypes.url listval criteria : t -> (OpamTypes.solver_criteria * string) listval best_effort_prefix : t -> string optionval solver : t -> OpamTypes.arg list optionval wrappers : t -> Wrappers.tval global_variables :
t ->
(OpamTypes.variable * OpamTypes.variable_contents * string) listvariable, value, docstring
val eval_variables : t -> (OpamTypes.variable * string list * string) listvariable, command, docstring
val validation_hook : t -> OpamTypes.arg list optionval default_compiler : t -> OpamTypes.formulaval default_invariant : t -> OpamTypes.formulaval depext : t -> boolval depext_run_installs : t -> boolval depext_cannot_install : t -> boolval depext_bypass : t -> OpamSysPkg.Set.tval sys_pkg_manager_cmd : t -> OpamTypes.filename OpamStd.String.Map.tval swh_fallback : t -> boolval git_location : t -> OpamTypes.dirname optionval fields :
(string * (t, OpamParserTypes.FullPos.value) OpamPp.field_parser) listval to_list :
?filename:'a typed_file ->
t ->
(string * OpamParserTypes.FullPos.value) listAll file fields as print-AST, Fields within sections are accessed through dot-separated paths
module BestEffort : BestEffortRead with type t := tval raw_root_version : 'a typed_file -> OpamVersion.t optionRaw read the config file to extract opam-root-version field value.