2018-02-25 16:35:25 +00:00
|
|
|
open Stdune
|
|
|
|
|
2016-12-02 13:54:32 +00:00
|
|
|
val colorize : key:string -> string -> string
|
2017-02-24 12:02:57 +00:00
|
|
|
|
2017-02-23 12:12:02 +00:00
|
|
|
val stderr_supports_colors : bool Lazy.t
|
2018-03-29 15:58:41 +00:00
|
|
|
|
|
|
|
(** [Env.initial] extended with variables to force a few tools to
|
|
|
|
print colors *)
|
|
|
|
val setup_env_for_colors : Env.t -> Env.t
|
2017-02-24 11:16:55 +00:00
|
|
|
|
|
|
|
(** Strip colors in [not (Lazy.force stderr_supports_colors)] *)
|
|
|
|
val strip_colors_for_stderr : string -> string
|
|
|
|
|
2017-02-24 11:28:30 +00:00
|
|
|
(** Enable the interpretation of color tags for [Format.err_formatter] *)
|
2017-02-24 11:16:55 +00:00
|
|
|
val setup_err_formatter_colors : unit -> unit
|
2017-02-24 12:02:57 +00:00
|
|
|
|
|
|
|
type styles
|
|
|
|
|
|
|
|
val output_filename : styles
|
|
|
|
|
|
|
|
val apply_string : styles -> string -> string
|
2018-02-25 16:35:25 +00:00
|
|
|
|
|
|
|
module Style : sig
|
|
|
|
type t =
|
|
|
|
| Loc
|
|
|
|
| Error
|
|
|
|
| Warning
|
|
|
|
| Kwd
|
|
|
|
| Id
|
|
|
|
| Prompt
|
|
|
|
| Details
|
|
|
|
| Ok
|
|
|
|
| Debug
|
|
|
|
end
|
|
|
|
|
|
|
|
module Render : Pp.Renderer.S
|
|
|
|
with type Tag.t = Style.t
|