package ppxlib

  1. Overview
  2. Docs
Standard library for ppx rewriters

Install

Dune Dependency

Authors

Maintainers

Sources

ppxlib-0.28.0.tbz
sha256=d87ae5f9a081206308ca964809b50a66aeb8e83d254801e8b9675448b60cf377
sha512=03270d43e91485e63c7dc115a71933ffd8cb2910c273d605d2800fa69f523dcd4de1fbe31fd6c2f6979675c681343bcf4e35be06934565bf28edf4ea03f5da8e

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.