package ppxlib

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t
val make : loc:t -> string -> sub:(t * string) list -> t
val createf : loc:t -> ('a, Stdppx.Caml.Format.formatter, unit, t) format4 -> 'a
val message : t -> string
val set_message : t -> string -> t
val register_error_of_exn : (exn -> t option) -> unit

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

val of_exn : exn -> t option

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

val 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.

val update_loc : t -> t -> t

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

val get_location : t -> t

Find out where the error is located.