package wax-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wax_wasm.OutputSource

Pretty-printing for Wasm Text Format.

Sourceval id_string : string -> string

id_string x is the source text of the identifier whose name (without the leading $) is x: $x for a plain identifier, or the quoted $"…" form with escaping otherwise. This is how module_ renders identifiers.

Sourcetype document

A module laid out into the printer's intermediate tree. Building it for a large module allocates heavily, so a caller that needs both the dry trivia-collection pass and the real emit should prepare it once and drive both off the result.

Lay a module out into its intermediate document. Pure; no printing.

collect doc set records every location emit doc would look up into set — the dry pass that drives Wax_utils.Trivia.associate's only argument, without laying anything out.

Sourceval emit : ?color:Wax_utils.Colors.flag -> ?out_channel:out_channel -> ?tail:Wax_utils.Trivia.entry list -> Wax_utils.Printer.t -> trivia:Wax_utils.Trivia.t -> document -> unit

Render a prepared document.

prepare then emit, in one call. Convenience for a caller that renders once and needs no collect pass; one that needs both should prepare once and drive them off the result.

Sourceval subtype_string : (Ast.Text.name option * Ast.Text.subtype, Ast.location) Ast.annotated -> string

A type definition ((type $id …)) rendered to a plain uncoloured string, for showing on hover over a type identifier.