package goblint

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module GobConfigSource

Configuration access.

New, untyped, path-based configuration subsystem.

path' ::== \epsilon              (*  *)
         | . <field-name> path'  (* field access *)
         | [ <index-nr> ] path'  (* array index access *)
         | [ + ] path'           (* cons to array *)
         | [ - ] path'           (* cons away from array *)
         | [ * ] path'           (* reset array *)

path ::==              path'     (*  *)
        | <field_name> path'     (* you can leave out the first dot *)

All functions failwith on error. Warnings are generated in verbose mode.

There is a "conf" trace option that traces setting.

Sourceexception ConfigError of string
Sourceval building_spec : bool Stdlib.ref
Sourcemodule Validator : sig ... end
Sourcemodule ValidatorRequireAll : sig ... end
Sourcemodule type S = sig ... end

The type for gobConfig module.

Sourcemodule Impl : S

The implementation of the gobConfig module.

include module type of struct include Impl end
Sourceval get_json : string -> Yojson.Safe.t

Get JSON value at a given path.

Sourceval set_json : string -> Yojson.Safe.t -> unit

Directly set a JSON value; the result must conform to the schema.

Sourceval get_conf : unit -> Yojson.Safe.t

Equivalent to get_json "".

Sourceval set_conf : Yojson.Safe.t -> unit

Equivalent to set_conf "".

Sourceval get_int : string -> int

Functions to query conf variable of type int.

Sourceval set_int : string -> int -> unit

Functions to modify conf variables of type int.

Sourceval get_bool : string -> bool

Functions to query conf variable of type bool.

Sourceval set_bool : string -> bool -> unit

Functions to modify conf variables of type bool.

Sourceval get_string : string -> string

Functions to query conf variable of type string.

Sourceval set_string : string -> string -> unit

Functions to modify conf variables of type string.

Sourceval set_auto : string -> string -> unit

Functions to modify conf variables by trying to parse the value. The second argument must be valid Json except single quotes represent double quotes.

Sourceval get_list : string -> Yojson.Safe.t list

Get a list of values

Sourceval get_string_list : string -> string list

Get a list of strings

Sourceval set_list : string -> Yojson.Safe.t list -> unit

Set a list of values

Sourceval write_file : Fpath.t -> unit

Write the current configuration to filename

Sourceval merge_file : Fpath.t -> unit

Merge configurations from a file with current.

Sourceval merge : Yojson.Safe.t -> unit

Merge configurations from a JSON object with current.

Sourceval is_immutable : unit -> bool

Check whether modification of configuration is currently allowed.

Sourceval with_immutable_conf : (unit -> 'a) -> 'a

Run the given computation with modification to configuration disabled.

Sourceval earlyglobs : bool Stdlib.ref

Another hack to see if earlyglobs is enabled

Sourceval jobs : unit -> int
OCaml

Innovation. Community. Security.