lang::pretty
lang/src/pretty.mo
pub def show_term (t : Term) : Stringpub def escape_string (s : String) : StringEscape a string's content for a "..." literal, so that what
show_literal prints reads back as the same value. Escapes \ and "
(required by the lexer), names the five common control bytes, and
spells the rest \u{..}. Bytes from 0x20 up are copied in RUNS rather
than one at a time: a lone byte of a multi-byte UTF-8 sequence is not a
valid String, so an astral character must stay whole.
pub def show_inductive (ind : Inductive) : Stringpub def show_struct (s : Struct) : StringA struct declaration as source: struct Name {, one field per line, }.
pub def show_class (cls : Class) : Stringpub def show_decls (decl_list : List Decl) : StringPretty-print a whole decl_list, one show_decl per declaration
separated by a blank line — the shape monad pretty's CLI command
wants (a readable source-text dump of a file's own declarations, not
a Show.show-derived debug dump of the internal LoadedModules
structure).