|
@@ -3806,7 +3806,9 @@ let make_generic ctx ps pt p =
|
|
let ident_safe = Str.global_substitute (Str.regexp "[^a-zA-Z0-9_]") subst in
|
|
let ident_safe = Str.global_substitute (Str.regexp "[^a-zA-Z0-9_]") subst in
|
|
let s_type_path_underscore (p,s) = match p with [] -> s | _ -> String.concat "_" p ^ "_" ^ s in
|
|
let s_type_path_underscore (p,s) = match p with [] -> s | _ -> String.concat "_" p ^ "_" ^ s in
|
|
let rec loop top t = match follow t with
|
|
let rec loop top t = match follow t with
|
|
- | TInst(c,tl) -> (ident_safe (s_type_path_underscore c.cl_path)) ^ (loop_tl tl)
|
|
|
|
|
|
+ | TInst(c,tl) -> (match c.cl_kind with
|
|
|
|
+ | KExpr e -> ident_safe (Ast.s_expr e)
|
|
|
|
+ | _ -> (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 [])
|
|
| 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)
|