package asai

  1. Overview
  2. Docs
type t

The type of all structured messages.

val default_severity : t -> Diagnostic.severity

The default severity level of a message. Severity levels classify diagnostics into errors, warnings, etc. It is about how serious the end user should take the diagnostic, not whether the program should stop or continue. The severity may be overwritten at the time of issuing a diagnostic.

val default_text : t -> Diagnostic.text

The default text of the message. This is the long explanation of the message that the end user would see. You might find helper functions Diagnostic.text and Diagnostic.textf useful. The text may be overwritten at the time of issuing a diagnostic.

val short_code : t -> string

A concise, ideally Google-able string representation of each message. Detailed or long descriptions should be avoided---the shorter, the better. For example, E001 works better than type-checking error. It will be assumed that the string representation has no control characters (such as newline characters).

OCaml

Innovation. Community. Security.