package opam-format

  1. Overview
  2. Docs

Module OpamFormatConfigSource

Sourcemodule E : sig ... end

Configuration options for the format lib (record, global reference and setter)

Sourcetype t = private {
  1. strict : bool;
    (*

    Fail early with errors in OPAM files

    *)
  2. skip_version_checks : bool;
    (*

    Ignore mismatching OPAM versions in files

    *)
  3. all_parens : bool;
    (*

    Affects the OPAM format printer; for backwards-compatibility

    *)
}
Sourcetype 'a options_fun = ?strict:bool -> ?skip_version_checks:bool -> ?all_parens:bool -> 'a
include OpamStd.Config.Sig with type t := t and type 'a options_fun := 'a options_fun
Sourceval default : t

The default values of the options to use at startup

Sourceval set : t -> (unit -> t) options_fun

Use to update any option in a t, using the optional arguments of options_fun. E.g. set opts ?option1:1 ?option4:"x" ()

Sourceval setk : (t -> 'a) -> t -> 'a options_fun

Same as set, but passes the result to a continuation, allowing argument stacking

Sourceval r : t ref

The global reference containing the currently set library options. Access using OpamXxxConfig.(!r.field).

Sourceval update : ?noop:_ -> (unit -> unit) options_fun

Updates the currently set options in r according to the optional arguments

Sourceval init : ?noop:_ -> (unit -> unit) options_fun

Sets the options, reading the environment to get default values when unspecified

Sourceval initk : 'a -> 'a options_fun

Sets the options like init, but returns the given value (for arguments stacking)

OCaml

Innovation. Community. Security.