package grace
Install
Dune Dependency
Authors
Maintainers
Sources
sha256=821df54882c9253eac69f47bcf3a71ffdc61c77fdae42587c32aada5b56cfeae
sha512=007afa83251da3ddecd874e120ea89dce0253c387a64a5fece69069d3486ec5eb6c82d6bf0febaf23dd322bd9eaadc2f7882e33f05a2e1fa18a41294e7dc3ba1
doc/grace/Grace/Diagnostic/index.html
Module Grace.Diagnostic
Source
Diagnostic types and constructors.
The type of format strings associated with messages.
- The input is always a
Format.formatter
- The result of
%a
and%t
printing functions isunit
.
The type of priority. These are used to style the primary and secondary causes of a diagnostic.
type 'code t = {
severity : Severity.t;
(*The overall severity of the diagnostic.
*)message : Message.t;
(*The main message associated with the diagnostic. These should not include control characters (such as the newline character
*)\n
). To support compact rendering, the message should be specific enough to make sense on its own, without the additional context provided by labels and notes.code : 'code option;
(*The (optional) error code assicoated with the diagnostic
*)labels : Label.t list;
(*Labels that describe the cause of the diagnostic. The order of the labels has no meaning, Grace's rendering engine will determine the order they appear.
*)notes : Message.t list;
(*Notes that are associated with the primary cause of the diagnostic.
*)
}
The type of diagnostics.
val create :
?notes:Message.t list ->
?labels:Label.t list ->
?code:'code ->
Severity.t ->
Message.t ->
'code t
create severity message
constructs a diagnostic with the message
.