Commit c527862b authored by Mário Pereira's avatar Mário Pereira
Browse files

Extraction of polymorphic recursion (correct parentheses)

parent 3ea313fd
...@@ -109,7 +109,7 @@ module ML = struct ...@@ -109,7 +109,7 @@ module ML = struct
rec_args : var list; rec_args : var list;
rec_exp : expr; rec_exp : expr;
rec_res : ty; rec_res : ty;
rec_svar : Stv.t; rec_svar : Stv.t; (* set of type variables *)
} }
type is_mutable = bool type is_mutable = bool
......
...@@ -315,7 +315,7 @@ module Print = struct ...@@ -315,7 +315,7 @@ module Print = struct
(* (print_list space (print_expr ~paren:true info)) tl *) (* (print_list space (print_expr ~paren:true info)) tl *)
and print_svar fmt s = and print_svar fmt s =
Stv.iter (fun tv -> fprintf fmt "%a" print_tv tv) s Stv.iter (fun tv -> fprintf fmt "%a " print_tv tv) s
and print_fun_type_args info fmt (args, s, res) = and print_fun_type_args info fmt (args, s, res) =
if Stv.is_empty s then if Stv.is_empty s then
...@@ -327,8 +327,8 @@ module Print = struct ...@@ -327,8 +327,8 @@ module Print = struct
let id_args = List.map (fun (id, _, _) -> id) args in let id_args = List.map (fun (id, _, _) -> id) args in
fprintf fmt ": @[%a@]. @[%a@] ->@ %a@ =@ fun @[%a@]@ ->" fprintf fmt ": @[%a@]. @[%a@] ->@ %a@ =@ fun @[%a@]@ ->"
print_svar s print_svar s
(print_list arrow (print_ty info)) ty_args (print_list arrow (print_ty ~paren:true info)) ty_args
(print_ty info) res (print_ty ~paren:true info) res
(print_list space (print_lident info)) id_args (print_list space (print_lident info)) id_args
and print_let_def info fmt = function and print_let_def info fmt = function
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment