package ppxlib

  1. Overview
  2. Docs
Standard infrastructure for ppx rewriters

Install

Dune Dependency

Authors

Maintainers

Sources

ppxlib-0.32.0.tbz
sha256=507cc73ccf895f22eeb5257a2243838c18a38a09105fcff55eeef9148555422b
sha512=73fef8ab8761bfbfde6ae87cc51eaacc5a5c937f0d628a890f0abdb2bffbf073932c25287a9e3baa2a1947c37f3dfa7f83ddd33c440e2e800971015addc97cd2

doc/ppxlib.astlib/Astlib/Location/Error/index.html

Module Location.Error

type t

The location error type. It contains a located main message and a (possibly empty) list of located submessages.

val is_well_formed : t -> bool

A location error constructed via make is always well-formed. A malformed location error is a value of type location_report on compilers >= 4.08, whose kind is different from Report_error. Notice that location_report does not explicitly form part of Astlib.

val main_msg : t -> string loc

Get the located error main message.

val sub_msgs : t -> string loc list

Get the located error sub-messages.

val set_main_msg : t -> string -> t

Set the text of the error's main message. The location stays as is.

val set_main_loc : t -> t -> t

Set the location of the error's main message. The text satys as is.

val make : sub:string loc list -> string loc -> t

Construct a location error.

val of_exn : exn -> t option

Turn an exception into a location error, if possible.

OCaml

Innovation. Community. Security.