From f73d601390a42a07a575db0c5efd5982471c2f2d Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Mon, 8 Jan 2018 16:35:08 +0000 Subject: Add some optional experimental rewrites to help with monomorphisation --- src/process_file.ml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/process_file.ml') diff --git a/src/process_file.ml b/src/process_file.ml index 83cfd8a3..127a5aee 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -126,9 +126,15 @@ let check_ast (defs : unit Ast.defs) : Type_check.tannot Ast.defs * Type_check.E let opt_ddump_raw_mono_ast = ref false let opt_dmono_analysis = ref 0 let opt_auto_mono = ref false +let opt_mono_rewrites = ref false let monomorphise_ast locs type_env ast = - let ast = Monomorphise.monomorphise (!Pretty_print_lem.opt_mwords) (!opt_auto_mono) (!opt_dmono_analysis) + let open Monomorphise in + let opts = { + auto = !opt_auto_mono; + debug_analysis = !opt_dmono_analysis; + rewrites = !opt_mono_rewrites } in + let ast = monomorphise (!Pretty_print_lem.opt_mwords) opts locs type_env 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 -- cgit v1.2.3