1 (**************************************************************************)
2 (* *)
3 (* OCaml *)
4 (* *)
5 (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *)
6 (* *)
7 (* Copyright 1997 Institut National de Recherche en Informatique et *)
8 (* en Automatique. *)
9 (* *)
10 (* All rights reserved. This file is distributed under the terms of *)
11 (* the GNU Lesser General Public License version 2.1, with the *)
12 (* special exception on linking described in the file LICENSE. *)
13 (* *)
14 (**************************************************************************)
15
16 (** Auxiliary type for reporting syntax errors
17
18 {b Warning:} this module is unstable and part of
19 {{!Compiler_libs}compiler-libs}.
20
21 *)
22
23 type error =
24 Unclosed of Location.t * string * Location.t * string
25 | Expecting of Location.t * string
26 | Not_expecting of Location.t * string
27 | Applicative_path of Location.t
28 | Variable_in_scope of Location.t * string
29 | Other of Location.t
30 | Ill_formed_ast of Location.t * string
31 | Invalid_package_type of Location.t * string
32
33 exception Error of error
34 exception Escape_error
35
36 val location_of_error: error -> Location.t
37 val ill_formed_ast: Location.t -> string -> 'a
38