package dune-private-libs
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=8f77d3a87f208e0d7cccaa1c48c4bb1bb87d62d07c3f25e9b8ba298e028ce52b
sha512=f209f12ced10c1abf8782bdb0143f4cec77795f7174d2cc75130afb1e01550b01f2f77b9e3ec4888efdad83d2f9878d179b39126f824f4e522f3ef4da34bf27e
doc/dune-private-libs.stdune/Stdune/User_message/index.html
Module Stdune.User_message
A message for the user
User messages are styled document that can be printed to the console or in the log file.
module Style : sig ... endSymbolic styles that can be used inside messages. These styles are later converted to actual concrete styles depending on the output device. For instance, when printed to the terminal they are converted to ansi terminal styles (Ansi_color.Style.t list values).
A user message.contents composed of an optional file location and a list of paragraphs.
The various paragraphs will be printed one after the other and will all start at the beginning of a line. They are all wrapped inside a Pp.box.
When hints are provided, they are printed as last paragraphs and prefixed with "Hint:". Hints should give indication to the user for how to fix the issue.
module Print_config : sig ... endval make :
?loc:Stdune__.Loc0.t ->
?prefix:Style.t Pp.t ->
?hints:Style.t Pp.t list ->
Style.t Pp.t list ->
tConstruct a user message from a list of paragraphs.
The first paragraph is prefixed with prefix inside the box. prefix should not end with a space as a space is automatically inserted by make if necessary.
val print : ?config:Print_config.t -> t -> unitPrint to stdout (not thread safe)
val prerr : ?config:Print_config.t -> t -> unitPrint to stderr (not thread safe)
Produces a "Did you mean ...?" hint
val to_string : t -> stringProduces a plain text representation of the error message, without the "Error: " prefix.