summaryrefslogtreecommitdiff
path: root/src/process_file.ml
diff options
context:
space:
mode:
authorBrian Campbell2017-08-22 17:31:48 +0100
committerBrian Campbell2017-08-22 17:31:48 +0100
commit2a6f3b8e42a4cb4cececb79a9011346b5b25ce80 (patch)
tree6564cdc73dbfdf15799911fba75ab69079d9025c /src/process_file.ml
parent679c797055970c31b17ce3c35bbc5cedd46b5ed7 (diff)
Add option to dump monomorphised ast before (re-)typechecking
Diffstat (limited to 'src/process_file.ml')
-rw-r--r--src/process_file.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/process_file.ml b/src/process_file.ml
index 1c133ce8..f445f900 100644
--- a/src/process_file.ml
+++ b/src/process_file.ml
@@ -108,8 +108,11 @@ let check_ast (defs : unit Ast.defs) : Type_check.tannot Ast.defs * Type_check.E
let () = if !opt_just_check then exit 0 else () in
(ast, env)
+let opt_ddump_raw_mono_ast = ref false
+
let monomorphise_ast locs ast =
let ast = Monomorphise.split_defs locs ast in
+ let () = if !opt_ddump_raw_mono_ast then Pretty_print.pp_defs stdout ast else () in
let ienv = Type_check.Env.no_casts Type_check.initial_env in
Type_check.check ienv ast