README

marianoguerra/wax/message does not have a README file

#
Message

pub(all) enum Message {
Empty
Words(String)
Atom(
Style
, Bool, String)
Raw((
Printer
,
Theme
) -> Unit)
Seq(Message, Message)
Sep(Message, Message)
Group(Message)
}

A diagnostic message.

#
Message::sep

fn Message::sep(self : Message, b : Message) -> Message

Juxtapose with a soft (wrap-point) space between.

#
Message::seq

fn Message::seq(self : Message, b : Message) -> Message

Juxtapose with no space between.

#
bool_

fn bool_(b : Bool) -> Message

#
code

fn code(s : String) -> Message

An emphasized inline code token -- an instruction, an operator, a literal.

#
concat

fn concat(l : Array[Message]) -> Message

#
enumerate

fn enumerate(items : Array[Message], conj? : String) -> Message

"a, b or c" -- commas, with conj before the last item.

#
group

fn group(m : Message) -> Message

Lay out as a keep-together box.

Used to wrap a rendered type so it does not reflow word by word.

#
ident

fn ident(s : String) -> Message

An emphasized source identifier.

#
int

fn int(n : Int) -> Message

#
int64

fn int64(n : Int64) -> Message

Emit s in the theme's colour for style, counting only its display width.

The escape sequences go through string_as 0 so they occupy no columns, and the text itself is measured by TERMINAL width rather than character count -- a wide glyph takes two columns.

#
raw

Run an imperative callback against the render-time printer and theme.

#
render

Emit m into p as a greedy fill box, so prose reflows at the enclosing layout's width.

#
styled

fn styled(style :
Style
, s : String) -> Message

One unbreakable styled atom, never quoted.

#
text

fn text(s : String) -> Message

Prose.

Splits on spaces into words joined by soft breaks, so it reflows at the render width; an embedded newline is a hard break.

#
to_plain_string

fn to_plain_string(m : Message) -> String

Render flat and ANSI-free, for the JSON and short output formats.

#
type_

fn type_(s : String) -> Message

An emphasized type name given as a string.

#
uint64

fn uint64(n : Int64) -> Message

n as an UNSIGNED 64-bit integer, so a value with the high bit set prints as its magnitude rather than as a negative number.

Powered by MoonBit

Site sourceReport issuePackagesBuild queueSkillsStatistics

© 2026 mooncakes.io