|
@@ -157,12 +157,11 @@ let type_function ctx (args : function_arguments) ret e do_display p =
|
|
|
| _ -> e
|
|
|
in
|
|
|
List.iter (fun r -> r := Closed) ctx.e.opened;
|
|
|
- let close () = List.iter (fun (m,p) -> safe_mono_close ctx m p) ctx.e.monomorphs.perfunction; in
|
|
|
let mono_debug = Meta.has (Meta.Custom ":debug.mono") ctx.f.curfield.cf_meta in
|
|
|
if mono_debug then begin
|
|
|
let pctx = print_context () in
|
|
|
let print_mono i m =
|
|
|
- Printf.sprintf "%4i: %s" i (s_mono pctx m)
|
|
|
+ Printf.sprintf "%4i: %s" i (s_mono_explicit pctx m)
|
|
|
in
|
|
|
print_endline "BEFORE:";
|
|
|
let monos = List.mapi (fun i (m,p) ->
|
|
@@ -174,9 +173,9 @@ let type_function ctx (args : function_arguments) ret e do_display p =
|
|
|
Printf.sprintf "%i:%i" l1 p1
|
|
|
end in
|
|
|
print_endline (Printf.sprintf "%s (%s)" s spos);
|
|
|
+ safe_mono_close ctx m p;
|
|
|
(i,m,p,s)
|
|
|
) ctx.e.monomorphs.perfunction in
|
|
|
- close();
|
|
|
print_endline "CHANGED:";
|
|
|
List.iter (fun (i,m,p,s) ->
|
|
|
let s' = print_mono i m in
|
|
@@ -185,7 +184,7 @@ let type_function ctx (args : function_arguments) ret e do_display p =
|
|
|
end
|
|
|
) monos
|
|
|
end else
|
|
|
- close();
|
|
|
+ List.iter (fun (m,p) -> safe_mono_close ctx m p) ctx.e.monomorphs.perfunction;
|
|
|
if is_position_debug then print_endline ("typing:\n" ^ (Texpr.dump_with_pos "" e));
|
|
|
e
|
|
|
|