package asai

  1. Overview
  2. Docs

The definition of highlighted text suitable for rendering. You probably do not need this module unless you want to create your own diagnostic handler.


type 'tag segment = 'tag option * string

A segment is an optionally tagged string from the user content. (Note the use of option.)

type 'tag line = {
  1. tags : 'tag list;
  2. segments : 'tag segment list;

A line is a list of segments along with tags.

type 'tag block = {
  1. begin_line_num : int;

    The starting 1-indexed line number of a block.

  2. end_line_num : int;

    The ending 1-indexed line number of a block.

  3. lines : 'tag line list;

    The lines within a block.


A block is a collection of consecutive lines.

type 'tag part = {
  1. source : Range.source;

    The source of a part.

  2. blocks : 'tag block list;

    The blocks within a part.


A part consists of multiple blocks from the same file. These blocks should be non-overlapping and sorted by importance or the textual order.

type 'tag t = 'tag part list

Highlighted texts.


val dump : (Stdlib.Format.formatter -> 'tag -> unit) -> Stdlib.Format.formatter -> 'tag t -> unit

Ugly printer for debugging


Innovation. Community. Security.