diff options
Diffstat (limited to 'src/process_file.ml')
| -rw-r--r-- | src/process_file.ml | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/process_file.ml b/src/process_file.ml index 090332fd..efa2ec55 100644 --- a/src/process_file.ml +++ b/src/process_file.ml @@ -89,6 +89,7 @@ let opt_new_typecheck = ref false let opt_just_check = ref false let opt_ddump_tc_ast = ref false let opt_dno_cast = ref false +let opt_mono_split = ref ([]:((string * int) * string) list) let check_ast (defs : Type_internal.tannot Ast.defs) (k : kind Envmap.t) (o:Ast.order) : Type_internal.tannot Ast.defs * Type_check.envs = let d_env = { Type_internal.k_env = k; Type_internal.abbrevs = Type_internal.initial_abbrev_env; @@ -103,6 +104,14 @@ let check_ast (defs : Type_internal.tannot Ast.defs) (k : kind Envmap.t) (o:Ast. then let ienv = if !opt_dno_cast then Type_check_new.Env.no_casts Type_check_new.initial_env else Type_check_new.initial_env in let ast, _ = Type_check_new.check ienv defs in + let ast = match !opt_mono_split with + | [] -> ast + | l -> + let ast = Monomorphise_new.split_defs l ast in + let ienv = Type_check_new.Env.no_casts Type_check_new.initial_env in + let ast, _ = Type_check_new.check ienv ast in + ast + in if !opt_ddump_tc_ast then Pretty_print.pp_defs stdout ast else () else (); if !opt_just_check |
