jenga

Industrial strength, full-featured build system
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library jenga
Module Jenga_lib . Api . Var
type 'a t

Var.t is a registered environment variable. It's value value may be queried and modified via the jenga RPC or command line.

val register : ?choices:string list -> string -> string option t

register name ?choices registers name. If choices is provided, this is attached as meta information, available when querying.

register_with_default ?default name ?choices is like register except default is used when the variable is unset, and is also attached as meta information.

Except for the registration of default as meta-info, register_with_default behaves as: register ?choices name |> map ~f:(Option.value ~default)

An exception is raised if the same name is registered more than once in a reload of the jengaroot.

val register_with_default : ?choices:string list -> string -> default:string -> string t
val peek : ?dont_trigger:unit -> 'a t -> 'a

peek t causes modification to t (via RPC or command-line) to trigger a reload of the jengaroot. To avoid this use Dep.getenv instead.

val map : 'a t -> f:( 'a -> 'b ) -> 'b t