|
@@ -2639,11 +2639,11 @@ let make_macro_api ctx p =
|
|
|
| TEnumDecl e -> TEnum (e,List.map snd e.e_types)
|
|
|
| TTypeDecl t -> TType (t,List.map snd t.t_types)
|
|
|
in
|
|
|
- let add_types () =
|
|
|
+(* let add_types () =
|
|
|
finalize ctx;
|
|
|
let l = Hashtbl.fold (fun v m l -> l @ m.m_types) ctx.g.modules ctx.com.types in
|
|
|
Interp.add_types (Interp.get_ctx()) l;
|
|
|
- in
|
|
|
+ in *)
|
|
|
{
|
|
|
Interp.pos = p;
|
|
|
Interp.get_com = (fun() -> ctx.com);
|
|
@@ -2652,7 +2652,6 @@ let make_macro_api ctx p =
|
|
|
let path = parse_path s in
|
|
|
try
|
|
|
let m = Some (Typeload.load_instance ctx { tpackage = fst path; tname = snd path; tparams = []; tsub = None } p true) in
|
|
|
- if ctx.in_macro then add_types();
|
|
|
m
|
|
|
with Error (Module_not_found _,p2) when p == p2 ->
|
|
|
None
|
|
@@ -2662,7 +2661,6 @@ let make_macro_api ctx p =
|
|
|
typing_timer ctx (fun() ->
|
|
|
let path = parse_path s in
|
|
|
let m = List.map make_instance (Typeload.load_module ctx path p).m_types in
|
|
|
- if ctx.in_macro then add_types();
|
|
|
m
|
|
|
)
|
|
|
);
|