diff options
| author | Brian Campbell | 2018-01-08 16:35:08 +0000 |
|---|---|---|
| committer | Brian Campbell | 2018-01-09 10:53:00 +0000 |
| commit | f73d601390a42a07a575db0c5efd5982471c2f2d (patch) | |
| tree | 55e061a47b71d2afa6c3c39e86f957f83c64cb58 /src/process_file.ml | |
| parent | ffcf8a814cdd23eaff9286835478afb66fbb0029 (diff) | |
Add some optional experimental rewrites to help with monomorphisation
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 8 |
1 files changed, 7 insertions, 1 deletions
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 |
