module BaseEnv:sig..end
Read-write access to 'setup.data'
type origin_t =
| |
ODefault |
(* | Default computed value. | *) |
| |
OGetEnv |
(* | Extracted from environment, using Sys.getenv. | *) |
| |
OFileLoad |
(* | From loading file setup.data. | *) |
| |
OCommandLine |
(* | Set on command line. | *) |
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 |
(* | No command line argument. | *) |
| |
CLIAuto |
(* | Build using variable name and help text. | *) |
| |
CLIWith |
(* | Use prefix --with-. | *) |
| |
CLIEnable |
(* | Use --enable/--disable. | *) |
| |
CLIUser of |
(* | Fully define the command line arguments. | *) |
Command line handling for variable.
type definition_t = {
|
hide : |
(* | Hide the variable. | *) |
|
dump : |
(* | Dump the variable. | *) |
|
cli : |
(* | Command line handling for the variable. | *) |
|
arg_help : |
(* | Help about the variable. | *) |
|
group : |
(* | Group of the variable. | *) |
}
Variable type.
val schema : (origin_t, definition_t) PropList.Schema.tSchema for environment.
val env : PropList.Data.tData for environment.
val var_expand : string -> stringExpand variable that can be found in string. Variable follow definition of
variable for Buffer.add_substitute.
val var_get : OASISTypes.name -> stringGet variable.
val var_choose : ?printer:('a -> string) -> ?name:string -> 'a OASISExpr.choices -> 'aChoose a value among conditional expressions.
val var_protect : string -> stringProtect 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 -> (unit -> string) -> unit -> stringDefine a variable.
val var_redefine : ?hide:bool ->
?dump:bool ->
?short_desc:(unit -> string) ->
?cli:cli_handle_t ->
?arg_help:string ->
?group:string -> OASISTypes.name -> (unit -> string) -> unit -> stringDefine a variable or redefine it.
val var_ignore : (unit -> string) -> unitWell-typed ignore for var_define.
: unit -> stringDisplay all variables, even hidden one.
val var_all : unit -> OASISTypes.name listGet all variables.
val default_filename : OASISContext.source_filenameEnvironment default file.
val load : ctxt:OASISContext.t ->
?allow_empty:bool -> ?filename:OASISContext.source_filename -> unit -> unitInitialize environment.
val unload : unit -> unitUninitialize environment.
val dump : ctxt:OASISContext.t -> ?filename:OASISContext.source_filename -> unit -> unitSave environment on disk.
val print : unit -> unitDisplay environment to user.
val args : unit -> (Stdlib.Arg.key * Stdlib.Arg.spec * Stdlib.Arg.doc) listDefault command line arguments, computed using variable definitions.