diff options
| author | Jon French | 2019-02-13 12:27:48 +0000 |
|---|---|---|
| committer | Jon French | 2019-02-13 12:27:48 +0000 |
| commit | ea39b3c674570ce5eea34067c36d5196ca201f83 (patch) | |
| tree | 516e7491bc32797a4d0ac397ea47387f2b16cf1b /src/reporting.mli | |
| parent | ab3f3671d4dd682b2aee922d5a05e9455afd5849 (diff) | |
| parent | 24fc989891ad266eae642815646294279e2485ca (diff) | |
Merge branch 'sail2' into rmem_interpreter
Diffstat (limited to 'src/reporting.mli')
| -rw-r--r-- | src/reporting.mli | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/reporting.mli b/src/reporting.mli index 63ed3eee..2d886111 100644 --- a/src/reporting.mli +++ b/src/reporting.mli @@ -69,13 +69,13 @@ val loc_to_string : ?code:bool -> Parse_ast.l -> string std-err. It starts with printing location information stored in [l] It then prints "head: mes". If [fatal] is set, the program exists with error-code 1 afterwards. *) -val print_err : bool -> bool -> Parse_ast.l -> string -> string -> unit +val print_err : Parse_ast.l -> string -> string -> unit (** {2 Errors } *) (** Errors stop execution and print a message; they typically have a location and message. *) -type error = +type error = (** General errors, used for multi purpose. If you are unsure, use this one. *) | Err_general of Parse_ast.l * string @@ -90,8 +90,7 @@ type error = | Err_syntax_locn of Parse_ast.l * string | Err_lex of Lexing.position * string | Err_type of Parse_ast.l * string - | Err_type_dual of Parse_ast.l * Parse_ast.l * string - + exception Fatal_error of error (** [err_todo l m] is an abreviatiation for [Fatal_error (Err_todo (l, m))] *) @@ -106,11 +105,6 @@ val err_unreachable : Parse_ast.l -> (string * int * int * int) -> string -> exn (** [err_typ l m] is an abreviatiation for [Fatal_error (Err_type (l, m))] *) val err_typ : Parse_ast.l -> string -> exn -(** [err_typ_dual l1 l2 m] is an abreviatiation for [Fatal_error (Err_type_dual (l1, l2, m))] *) -val err_typ_dual : Parse_ast.l -> Parse_ast.l -> string -> exn - -(** Report error should only be used by main to print the error in the end. Everywhere else, - raising a [Fatal_error] exception is recommended. *) -val report_error : error -> 'a +val unreachable : Parse_ast.l -> (string * int * int * int) -> string -> 'a val print_error : error -> unit |
