Up

module OpamGlobals

: sig

Convention: all the global OPAM variables can be set using environment variables using OPAM<variable>

#
val debug : bool Pervasives.ref
#
val debug_level : int Pervasives.ref
#
val verbose : bool Pervasives.ref
#
val color_tri_state : [>
| `Always
| `Auto
| `Never
]
#
val color : bool Pervasives.ref
#
val keep_build_dir : bool Pervasives.ref
#
val no_base_packages : bool Pervasives.ref
#
val no_checksums : bool Pervasives.ref
#
val req_checksums : bool Pervasives.ref
#
val yes : bool Pervasives.ref
#
val strict : bool Pervasives.ref
#
val build_test : bool Pervasives.ref
#
val build_doc : bool Pervasives.ref
#
val show : bool Pervasives.ref
#
val dryrun : bool Pervasives.ref
#
val fake : bool Pervasives.ref
#
val print_stats : bool Pervasives.ref
#
val utf8_msgs : bool Pervasives.ref
#
val do_not_copy_files : bool Pervasives.ref
#
val sync_archives : bool Pervasives.ref
#
val compat_mode_1_0 : bool Pervasives.ref
#
val use_external_solver : bool Pervasives.ref
#
val no_self_upgrade : bool Pervasives.ref
#
val skip_version_checks : bool Pervasives.ref
#
val safe_mode : bool Pervasives.ref
#
val all_parens : bool Pervasives.ref

Tells the printer to write parens everywhere

#
val self_upgrade_bootstrapping_value : string
#
val is_self_upgrade : bool
#
val curl_command : string option
#
val jobs : int option Pervasives.ref
#
val dl_jobs : int option Pervasives.ref
#
val download_retry : int
#
val cudf_file : string option Pervasives.ref
#
val solver_timeout : float
#
type solver_criteria = [
| `Default
| `Upgrade
| `Fixup
]
#
val default_preferences : solver_criteria -> string
#
val compat_preferences : solver_criteria -> string
#
val solver_preferences : (solver_criteria * string) list Pervasives.ref

Solver preference bindings. Used with List.assoc: first one wins

#
val get_solver_criteria : [
| `Default
| `Upgrade
| `Fixup
] -> string

Get the currently configured solver criteria as a string

#
val default_external_solver : string
#
val external_solver : string option Pervasives.ref
#
val get_external_solver : unit -> string
#
val default_repository_name : string
#
val default_repository_address : string
#
val search_files : string list Pervasives.ref
#
val global_config : string
#
val system : string
#
val switch : [
| `Command_line of string
| `Env of string
| `Not_set
] Pervasives.ref
#
val external_tags : string list Pervasives.ref
#
val home : string
#
val default_opam_dir : string
#
val root_dir : string Pervasives.ref
#
val root_dir_tmp : string

The initial value of root_dir, set in the tmpdir before initialised

#
val timer : unit -> unit -> float
#
val global_start_time : float
#
type text_style = [
| `black
| `blue
| `bold
| `cyan
| `green
| `magenta
| `red
| `underline
| `white
| `yellow
]
#
val colorise : text_style -> string -> string

not nestable

#
val indent_left : string -> int -> string
#
val acolor : text_style -> Pervasives.out_channel -> string -> unit
#
val acolor_w : int -> text_style -> Pervasives.out_channel -> string -> unit
#
val timestamp : unit -> string
#
val log : string -> ?level:int -> ('a, Pervasives.out_channel, unit) Pervasives.format -> 'a

log section ~level fmt args. Used for debug messages, default level is 1

#
val slog : ('a -> string) -> Pervasives.out_channel -> 'a -> unit

Helper to pass stringifiers to log (use log "%a" (slog to_string) x rather than log "%s" (to_string x) to avoid costly unneeded stringifications

#
val error : ('a, unit, string, unit) Pervasives.format4 -> 'a
#
val warning : ('a, unit, string, unit) Pervasives.format4 -> 'a
#
val note : ('a, unit, string, unit) Pervasives.format4 -> 'a
#
exception Exit of int

Raised to exit the program in a clean way. Parameter is the exit code.

#
exception Exec of string * string array * string array

Raised to exec() another binary, after making sure finalisations have been made properly. Parameters as per Unix.execvpe

#
exception Package_error of string
#
val error_and_exit : ('a, unit, string, 'b) Pervasives.format4 -> 'a
#
val msg : ('a, Pervasives.out_channel, unit, unit) Pervasives.format4 -> 'a
#
val header_msg : ('a, unit, string, unit) Pervasives.format4 -> 'a
#
val header_error : ('a, unit, string, ('b, unit, string, unit) Pervasives.format4 -> 'b) Pervasives.format4 -> 'a
#
val confirm : ('a, unit, string, bool) Pervasives.format4 -> 'a

Ask the user to press Y/y/N/n to continue (returns a boolean)

Read some input from the user (returns a string option)

#
val read : ('a, unit, string, string option) Pervasives.format4 -> 'a
#
val editor : string lazy_t
#
type os =
# | Darwin
# | Linux
# | FreeBSD
# | OpenBSD
# | NetBSD
# | DragonFly
# | Cygwin
# | Win32
# | Unix
# | Other of string
#
val os : unit -> os
#
val os_string : unit -> string
#
val arch : unit -> string
#
val makecmd : (unit -> string) Pervasives.ref
#
val log_limit : int
#
val log_line_limit : int
#
val default_jobs : int
#
val default_dl_jobs : int
#
val exit : int -> 'a
end