From 1826a36d74471437b09984857a8089e31c252ef2 Mon Sep 17 00:00:00 2001 From: favonia Date: Sun, 24 Sep 2023 03:58:53 +0000 Subject: [PATCH] deploy: 7d46e579cd40e6e7489e3657e1ac98262f889f57 --- asai/Asai/Diagnostic/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/asai/Asai/Diagnostic/index.html b/asai/Asai/Diagnostic/index.html index 4bbd327..186075c 100644 --- a/asai/Asai/Diagnostic/index.html +++ b/asai/Asai/Diagnostic/index.html @@ -9,13 +9,7 @@ ?loc:Span.t -> (message -> 'b) -> ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> - 'a

kmessagef kont format ... is kont (messagef code format ...).

Constructions of Diagnostics

val of_message : - ?backtrace:backtrace -> - ?additional_messages:message list -> - severity -> - 'code -> - message -> - 'code t

of_message severity code message constructs a diagnostic with the message.

Example:

make Warning `ChiError @@ message "Your Ch'i is critically low"
  • parameter backtrace

    The backtrace (to overwrite the accumulative frames up to this point).

  • parameter additional_messages

    Additional messages that part of the backtrace. For example, they can be bindings shadowed by the current one.

val make : + 'a

kmessagef kont format ... is kont (messagef code format ...).

  • parameter loc

    The location of the message (usually the code) to highlight.

Constructions of Diagnostics

val make : ?loc:Span.t -> ?backtrace:backtrace -> ?additional_messages:message list -> @@ -37,4 +31,10 @@ severity -> 'code -> ('a, Stdlib.Format.formatter, unit, 'b) Stdlib.format4 -> - 'a

kmakef kont severity code format ... is kont (makef severity code format ...).

  • parameter loc

    The location of the text (usually the code) to highlight.

  • parameter backtrace

    The backtrace (to overwrite the accumulative frames up to this point).

  • parameter additional_messages

    Additional messages that part of the backtrace. For example, they can be bindings shadowed by the current one.

Other Helper Functions

val string_of_severity : severity -> string

A convenience function that converts a severity into its constructor name. For example, Warning will be converted into the string "Warning".

val string_of_text : text -> string

A convenience function that converts a text into a string by formatting it with the maximum admissible margin. Note that the resulting string may contain newline characters and thus not suitable to .

val map : ('code1 -> 'code2) -> 'code1 t -> 'code2 t

A convenience function that maps the message code. This is helpful when using Logger.S.adopt.

\ No newline at end of file + 'a

kmakef kont severity code format ... is kont (makef severity code format ...).

val of_message : + ?backtrace:backtrace -> + ?additional_messages:message list -> + severity -> + 'code -> + message -> + 'code t

of_message severity code message constructs a diagnostic with the message.

Example:

make Warning `ChiError @@ message "Your Ch'i is critically low"
  • parameter backtrace

    The backtrace (to overwrite the accumulative frames up to this point).

  • parameter additional_messages

    Additional messages that part of the backtrace. For example, they can be bindings shadowed by the current one.

Other Helper Functions

val map : ('code1 -> 'code2) -> 'code1 t -> 'code2 t

A convenience function that maps the message code. This is helpful when using Logger.S.adopt.

val string_of_severity : severity -> string

A convenience function that converts a severity into its constructor name. For example, Warning will be converted into the string "Warning".

val string_of_text : text -> string

A convenience function that converts a text into a string by formatting it with the maximum admissible margin. Note that the resulting string may contain newline characters and thus not suitable to .

\ No newline at end of file