module BaseEnv: sig
.. end
Read-write access to 'setup.data'
Author(s): Sylvain Le Gall
type
origin_t =
| |
ODefault |
| |
OGetEnv |
| |
OFileLoad |
| |
OCommandLine |
Origin of the variable, if a variable has been already set
with a higher origin, it won't be set again.
type
cli_handle_t =
| |
CLINone |
| |
CLIAuto |
| |
CLIWith |
| |
CLIEnable |
| |
CLIUser of (Arg.key * Arg.spec * Arg.doc) list |
Command line handling for variable.
type
definition_t = {
}
Variable type.
val schema : (origin_t, definition_t) PropList.Schema.t
Schema for environment.
val var_expand : string -> string
Expand variable that can be found in string. Variable follow definition of
* variable for Buffer.add_substitute
.
val var_get : OASISTypes.name -> string
Get variable.
val var_choose : ?printer:('a -> string) -> ?name:string -> 'a OASISExpr.choices -> 'a
Choose a value among conditional expressions.
val var_protect : string -> string
Protect a variable content, to avoid expansion.
val var_define : ?hide:bool ->
?dump:bool ->
?short_desc:(unit -> string) ->
?cli:cli_handle_t ->
?arg_help:string ->
?group:string -> OASISTypes.name -> string Lazy.t -> unit -> string
Define a variable.
val var_redefine : ?hide:bool ->
?dump:bool ->
?short_desc:(unit -> string) ->
?cli:cli_handle_t ->
?arg_help:string ->
?group:string -> OASISTypes.name -> string Lazy.t -> unit -> string
Define a variable or redefine it.
val var_ignore : (unit -> string) -> unit
Well-typed ignore for var_define
.
val print_hidden : unit -> string
Display all variables, even hidden one.
val var_all : unit -> OASISTypes.name list
Get all variables.
val default_filename : OASISTypes.host_filename
Environment default file.
val load : ?allow_empty:bool -> ?filename:OASISTypes.host_filename -> unit -> unit
Initialize environment.
val unload : unit -> unit
Uninitialize environment.
val dump : ?filename:OASISTypes.host_filename -> unit -> unit
Save environment on disk.
val print : unit -> unit
Display environment to user.
val args : unit -> (Arg.key * Arg.spec * Arg.doc) list
Default command line arguments, computed using variable definitions.