2016-02-18 07:11:59 -08:00
|
|
|
(**************************************************************************)
|
|
|
|
(* *)
|
|
|
|
(* OCaml *)
|
|
|
|
(* *)
|
|
|
|
(* Fabrice Le Fessant, EPI Gallium, INRIA Paris-Rocquencourt *)
|
|
|
|
(* *)
|
|
|
|
(* Copyright 2013 Institut National de Recherche en Informatique et *)
|
|
|
|
(* en Automatique. *)
|
|
|
|
(* *)
|
|
|
|
(* All rights reserved. This file is distributed under the terms of *)
|
|
|
|
(* the GNU Lesser General Public License version 2.1, with the *)
|
|
|
|
(* special exception on linking described in the file LICENSE. *)
|
|
|
|
(* *)
|
|
|
|
(**************************************************************************)
|
2013-06-05 09:34:40 -07:00
|
|
|
|
2019-03-11 11:38:16 -07:00
|
|
|
val init_path : ?dir:string -> unit -> unit
|
2013-06-05 09:34:40 -07:00
|
|
|
val initial_env : unit -> Env.t
|
Respect OCAML_COLOR environment variable for deciding whether to use colors
Since 4.03, OCaml supports coloring its messages to standard output and standard
error, depending on the "-color" argument ({always,never,auto}). This commit
adds support for the environment variable "OCAML_COLOR" (which value can as well
be {always,never,auto}).
The command line argument "-color" takes precedence, "OCAML_COLOR" is only
taken into consideration if no "-color" is provided.
The motivation for this is that the user should have control over coloring
OCaml's output messages. OCamlbuild, a widely used build tool executes OCaml
not under a tty (and OCaml does not colorize errors and warnings), which lead
various packages use `color(always)` in their `_tags` files, which breaks with
other (non-interactive) programs (i.e. editor helpers).
Further discussion was done at https://github.com/ocaml/ocamlbuild/issues/87 and
https://github.com/ocaml/ocaml/pull/1098.
2017-03-11 03:38:59 -08:00
|
|
|
|
2018-10-19 13:20:30 -07:00
|
|
|
(* Support for flags that can also be set from an environment variable *)
|
|
|
|
val set_from_env : 'a option ref -> 'a Clflags.env_reader -> unit
|
|
|
|
val read_clflags_from_env : unit -> unit
|
2018-07-27 00:51:53 -07:00
|
|
|
|
2019-01-04 10:03:09 -08:00
|
|
|
val with_ppf_dump : file_prefix:string -> (Format.formatter -> 'a) -> 'a
|