Up

module As_env

: sig

Command runtime environment.

Setup environements

#
type setup = {
# auto_load
: bool;(*true to add assemblage lib to includes.*)
# includes
: string list;(*includes to add to toploop execution.*)
# assemble_file
: string;(*file to execute.*)
# exec_status
: [
| `Ok of unit
| `Error of string
]
;
}

The type for setup environments.

This is only used by the assemblage tool. It determines the environment in which assemble.ml will be executed and the result of that execution.

#
val parse_setup : unit -> setup

parse_setup () must be called by the assemblage tool.

This function is not called by assemble.ml files (and thus not called if the assemble.ml file is used as a standalone executable).

#
val get_setup : unit -> setup option

get_setup () returns the setup environment, if any.

Command runtime environments

#
type t = {
# setup
: setup option;
# verbose
: bool;
# color
: [
| `Auto
| `Always
| `Never
]
;
# utf8_msgs
: bool;
}

The type for command runtime environments.

#
val create : setup option -> bool -> [
| `Auto
| `Always
| `Never
] -> t

create setup verbose color is an environement with the corresponding parameters or as overriden by Sys.env values.

#
val created : unit -> bool

true if an environment value was created with created

#
val variable_docs : (string * string) list

variable_docs is a list of environement variables and their documentation

end