dune/src/colors.mli

38 lines
751 B
OCaml
Raw Normal View History

open Stdune
2016-12-02 13:54:32 +00:00
val colorize : key:string -> string -> string
2017-02-24 12:02:57 +00:00
val stderr_supports_colors : bool Lazy.t
(** [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
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