|
@@ -44,6 +44,7 @@ let make_generic ctx ps pt p =
|
|
| _ -> (ident_safe (s_type_path_underscore c.cl_path)) ^ (loop_tl tl))
|
|
| _ -> (ident_safe (s_type_path_underscore c.cl_path)) ^ (loop_tl tl))
|
|
| TEnum(en,tl) -> (s_type_path_underscore en.e_path) ^ (loop_tl tl)
|
|
| TEnum(en,tl) -> (s_type_path_underscore en.e_path) ^ (loop_tl tl)
|
|
| TAnon(a) -> "anon_" ^ String.concat "_" (PMap.foldi (fun s f acc -> (s ^ "_" ^ (loop false (follow f.cf_type))) :: acc) a.a_fields [])
|
|
| TAnon(a) -> "anon_" ^ String.concat "_" (PMap.foldi (fun s f acc -> (s ^ "_" ^ (loop false (follow f.cf_type))) :: acc) a.a_fields [])
|
|
|
|
+ | TFun(args, return_type) -> "func_" ^ (String.concat "_" (List.map (fun (_, _, t) -> loop false t) args)) ^ "_" ^ (loop false return_type)
|
|
| TAbstract(a,tl) -> (s_type_path_underscore a.a_path) ^ (loop_tl tl)
|
|
| TAbstract(a,tl) -> (s_type_path_underscore a.a_path) ^ (loop_tl tl)
|
|
| _ when not top -> "_" (* allow unknown/incompatible types as type parameters to retain old behavior *)
|
|
| _ when not top -> "_" (* allow unknown/incompatible types as type parameters to retain old behavior *)
|
|
| TMono _ -> raise (Generic_Exception (("Could not determine type for parameter " ^ s), p))
|
|
| TMono _ -> raise (Generic_Exception (("Could not determine type for parameter " ^ s), p))
|