package MlFront_Thunk

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

Module Diagnose.MakeReportSource

Report definition and pretty printing.

Parameters

module Doc : sig ... end
module Theme : sig ... end

Signature

Sourcetype 'msg t = {
  1. markers : (position * 'msg marker) list;
    (*

    A map associating positions with marker to show under the source code.

    *)
  2. is_error : bool;
    (*

    Is the report a warning or an error?

    *)
  3. code : string option;
    (*

    An optional error code to print at the top.

    *)
  4. message : string;
    (*

    The message associated with the error.

    *)
  5. blurbs : blurb list;
    (*

    A list of notes, hints, and expectations to add at the end of the report.

    *)
}
Sourceand blurb =
  1. | Note of string
  2. | Hint of string
  3. | Expectation of string * string
Sourceand position = {
  1. file : string option;
    (*

    The file name, if available.

    *)
  2. begin_line : int;
    (*

    Beginning line number. 1-based.

    *)
  3. end_line : int;
    (*

    Ending line number. 1-based.

    *)
  4. begin_col : int;
    (*

    Beginning column number. 1-based.

    *)
  5. end_col : int;
    (*

    Ending column number. 1-based.

    *)
}

The type of positions in source code. All lines and columns are 1-based. It is used to specify where a marker should be placed.

Sourceand 'msg marker =
  1. | This of 'msg
    (*

    A red or yellow marker under source code, marking important parts of the code.

    *)
  2. | Where of 'msg
    (*

    A blue marker symbolizing additional information.

    *)
  3. | Maybe of 'msg
    (*

    A magenta marker to report potential fixes.

    *)
  4. | Blank
    (*

    An empty marker, whose sole purpose is to include a line of code in the report without markers under.

    *)

The type of markers used in reports. It is abstracted by a type variable 'msg to allow for different message types.

Sourceval pretty_report : readonly_file_map:string array FilenameMap.t -> with_unicode:bool -> tab_size:int -> string t -> string