summaryrefslogtreecommitdiff
path: root/src/reporting.mli
diff options
context:
space:
mode:
authorAlasdair Armstrong2018-12-22 00:20:08 +0000
committerAlasdair Armstrong2018-12-22 00:20:08 +0000
commit0a65347ed2868b815dee532acfebb463f8be644b (patch)
tree662b9fb1b240984597b3050fe4c174ccfceecd0f /src/reporting.mli
parentc745a9a8d8d7d2b04e72bbb8bda9d9f0a7aabbfb (diff)
Improve error messages and debugging
Work on improving the formatting and quality of error messages When sail is invoked with sail -i, any type errors now drop the user down to the interactive prompt, with the interactive environment being the environment at the point the type error occurred, this means the typechecker state can be interactively queried in the interpreter to help diagnose type errors.
Diffstat (limited to 'src/reporting.mli')
-rw-r--r--src/reporting.mli8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/reporting.mli b/src/reporting.mli
index 63ed3eee..4ce0ced8 100644
--- a/src/reporting.mli
+++ b/src/reporting.mli
@@ -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,8 @@ 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 report_error : error -> unit
val print_error : error -> unit