package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

dune-project
 Dependency

Authors

Maintainers

Sources

ppxlib-0.38.0.tbz
sha256=89e049b3102f6670a213d34d802ea3ab0fc530a8959d2f1a1e8db830063429a3
sha512=2fbbf124fc61e1f22242d13505e9af39d4a3c7cf03def1c33ee8bd915195be9b817636667302e9c6ceddc74a9a4a54926340e21c96fd770a2bc6752400315cfd

doc/ppxlib/Ppxlib/Location/Error/index.html

Module Location.ErrorSource

For a detailed explanation on error reporting, refer to the relevant part of the tutorial.

Sourceval make : loc:t -> string -> sub:(t * string) list -> t
Sourceval createf : loc:t -> ('a, Format.formatter, unit, t) format4 -> 'a
Sourceval message : t -> string
Sourceval set_message : t -> string -> t
Sourceval register_error_of_exn : (exn -> t option) -> unit

Register an exception handler. Exception registered this way will be properly displayed by report_exception.

Sourceval of_exn : exn -> t option

Convert an error to an extension point. The compiler recognizes this and displays the error properly.

Sourceval raise : t -> 'a

Raise a compiler Parsing.Location.Error exception. The composition of Location.Error.createf with Location.Error.raise is the same as Location.raise_errorf.

Sourceval update_loc : t -> t -> t

Update where the error is located. The old location will be overwritten.

Sourceval get_location : t -> t

Find out where the error is located.

Sourceval of_extension : (string Astlib.Location.loc * Astlib.Ast_502.Parsetree.payload) -> t option

Convert an extension point to an error. Extension points must have the exact form as created by to_extension.