| 1 | (************************************************************************) |
| 2 | (* * The Rocq Prover / The Rocq Development Team *) |
| 3 | (* v * Copyright INRIA, CNRS and contributors *) |
| 4 | (* <O___,, * (see version control and CREDITS file for authors & dates) *) |
| 5 | (* \VV/ **************************************************************) |
| 6 | (* // * This file is distributed under the terms of the *) |
| 7 | (* * GNU Lesser General Public License Version 2.1 *) |
| 8 | (* * (see LICENSE file for the text of the license) *) |
| 9 | (************************************************************************) |
| 10 | |
| 11 | type t |
| 12 | |
| 13 | val make : loc:Loc.t -> Pp.t -> t |
| 14 | |
| 15 | val pp : t -> Pp.t |
| 16 | |
| 17 | val loc : t -> Loc.t |
| 18 | |
| 19 | (** [register h] registers [h] as a quickfix generator. |
| 20 | When an error is generated the toplevel can check if there is |
| 21 | quick fix for it. |
| 22 | |
| 23 | Quickfix generators signal that they don't deal with some exception |
| 24 | by returning []. Raising any other exception is |
| 25 | forbidden. |
| 26 | |
| 27 | Exceptions that are considered anomalies should not be |
| 28 | handled by Quickfix generators. |
| 29 | *) |
| 30 | |
| 31 | val register : (exn -> t list) -> unit |
| 32 | |
| 33 | (** computes all the quickfixes for a given exception *) |
| 34 | val from_exception : exn -> (t list, Exninfo.iexn) result |
| 35 | |
| 36 | (** Prints all the quickfixes in a vertical box *) |
| 37 | val print : t list -> Pp.t |