diff options
| author | Alasdair Armstrong | 2018-12-22 00:20:08 +0000 |
|---|---|---|
| committer | Alasdair Armstrong | 2018-12-22 00:20:08 +0000 |
| commit | 0a65347ed2868b815dee532acfebb463f8be644b (patch) | |
| tree | 662b9fb1b240984597b3050fe4c174ccfceecd0f /src/process_file.ml | |
| parent | c745a9a8d8d7d2b04e72bbb8bda9d9f0a7aabbfb (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/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index 0194baa8..03fc36a2 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -384,7 +384,7 @@ let rewrite_step defs (name, rewriter) = let rewrite rewriters defs = try List.fold_left rewrite_step defs rewriters with - | Type_check.Type_error (l, err) -> + | Type_check.Type_error (_, l, err) -> raise (Reporting.err_typ l (Type_error.string_of_type_error err)) let rewrite_ast = rewrite [("initial", Rewriter.rewrite_defs)] |
