package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

Dune Dependency

Authors

Maintainers

Sources

ppxlib-0.35.0.tbz
sha256=d9d959fc9f84260487e45684dc741898a92fc5506b61a7f5cac65d21832db925
sha512=e428b1e3b89261c7efdaa18016264d1afbf067cb9b0d41124b04796c2487ac7ca8ee9a24a60d56f20d1774cb44aaa9ecf1512f17455812ba8d62d4ef93616ee7

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.

Sourcetype t
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.

OCaml

Innovation. Community. Security.