jon.recoil.org

Module OpamFile.ConfigSource

Configuration file: $opam/config

include OpamFile.IO_FILE
Sourcetype t

File contents

Sourceval format_version : OpamVersion.t

Empty file

Write some contents to a file

Read file contents.

Returns None on non-existing file

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

Sourceval read_from_string : ?filename:OpamFile.Config.t OpamFile.typed_file -> string -> OpamFile.Config.t
Sourceval write_to_string : ?filename:OpamFile.Config.t OpamFile.typed_file -> OpamFile.Config.t -> string
Sourceval root_version : OpamTypes.opam_version

Current root version

OCaml switch updates

Sourceval with_installed_switches : OpamTypes.switch list -> OpamFile.Config.t -> OpamFile.Config.t

The list of switches, ordered by most recently used first

Repository updates

Update opam-version

Sourceval with_opam_root_version : OpamVersion.t -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_criteria : (OpamTypes.solver_criteria * string) list -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_best_effort_prefix : string -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_best_effort_prefix_opt : string option -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_solver_opt : OpamTypes.arg list option -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_jobs : int -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_jobs_opt : int option -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_dl_tool_opt : OpamTypes.arg list option -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_dl_jobs : int -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_eval_variables : (OpamTypes.variable * string list * string) list -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_validation_hook_opt : OpamTypes.arg list option -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_depext : bool -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_depext_run_installs : bool -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_depext_cannot_install : bool -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_swh_fallback : bool -> OpamFile.Config.t -> OpamFile.Config.t
Sourceval with_git_location_opt : OpamTypes.dirname option -> OpamFile.Config.t -> OpamFile.Config.t

Return the opam version

Return the opam root version, if not defined returns the default version value 2.1~~previous

Sourceval opam_root_version_opt : OpamFile.Config.t -> OpamTypes.opam_version option

Return the opam root version if defined

Return the list of repository

Return the OCaml switch

Sourceval previous_switch : OpamFile.Config.t -> OpamTypes.switch option
Sourceval installed_switches : OpamFile.Config.t -> OpamTypes.switch list
Sourceval jobs : OpamFile.Config.t -> int option

Return the number of jobs defined

Sourceval dl_tool : OpamFile.Config.t -> OpamTypes.arg list option
Sourceval dl_jobs : OpamFile.Config.t -> int

Return the number of download jobs

Sourceval dl_cache : OpamFile.Config.t -> OpamTypes.url list
Sourceval criteria : OpamFile.Config.t -> (OpamTypes.solver_criteria * string) list
Sourceval best_effort_prefix : OpamFile.Config.t -> string option
Sourceval solver : OpamFile.Config.t -> OpamTypes.arg list option
Sourceval global_variables : OpamFile.Config.t -> (OpamTypes.variable * OpamTypes.variable_contents * string) list

variable, value, docstring

Sourceval eval_variables : OpamFile.Config.t -> (OpamTypes.variable * string list * string) list

variable, command, docstring

Sourceval validation_hook : OpamFile.Config.t -> OpamTypes.arg list option
Sourceval default_compiler : OpamFile.Config.t -> OpamTypes.formula
Sourceval default_invariant : OpamFile.Config.t -> OpamTypes.formula
Sourceval depext : OpamFile.Config.t -> bool
Sourceval depext_run_installs : OpamFile.Config.t -> bool
Sourceval depext_cannot_install : OpamFile.Config.t -> bool
Sourceval swh_fallback : OpamFile.Config.t -> bool
Sourceval git_location : OpamFile.Config.t -> OpamTypes.dirname option
Sourceval to_list : ?filename:'a OpamFile.typed_file -> OpamFile.Config.t -> (string * OpamParserTypes.FullPos.value) list

All file fields as print-AST, Fields within sections are accessed through dot-separated paths

Sourceval raw_root_version : 'a OpamFile.typed_file -> OpamVersion.t option

Raw read the config file to extract opam-root-version field value.