From 0a65347ed2868b815dee532acfebb463f8be644b Mon Sep 17 00:00:00 2001 From: Alasdair Armstrong Date: Sat, 22 Dec 2018 00:20:08 +0000 Subject: 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. --- src/interactive.ml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 src/interactive.ml (limited to 'src/interactive.ml') diff --git a/src/interactive.ml b/src/interactive.ml new file mode 100644 index 00000000..3c4619a0 --- /dev/null +++ b/src/interactive.ml @@ -0,0 +1,7 @@ + +let opt_interactive = ref false +let opt_suppress_banner = ref false + +let env = ref Type_check.initial_env + +let ast = ref (Ast.Defs []) -- cgit v1.2.3