package grace

  1. Overview
  2. Docs

Module Diagnostic.MessageSource

The type of messages.

Messages are unrendered formatted strings. The rendering is delayed till Grace's renderering engine since layout decisions are it's responsibility.

A valid message must satisfy the following two conditions:

  1. Messages must be encoded using ASCII.
  2. Messages must not contain control characters such as the newline character \n.

Eqality and comparison of messages is performed on the hash of the messages rendered contents.

include Sexplib0.Sexpable.S with type t := t
Sourceval t_of_sexp : Sexplib0.Sexp.t -> t
Sourceval sexp_of_t : t -> Sexplib0.Sexp.t
include Grace_std.Pretty_printer.S with type t := t
Sourceval pp : t Fmt.t
Sourceval create : string -> t

create str converts the string str into a message.

Sourceval createf : ('a, t) format -> 'a

createf fmt ... formats a message.

Sourceval kcreatef : (t -> 'b) -> ('a, 'b) format -> 'a

kcreatef kont fmt ... is equivalent to kont (createf fmt ...).

Sourceval to_string : t -> string

converts a message into a string by formatting it with the maximum admissible margin.

Sourceval of_string : string -> t

alias of Message.create.