|
@@ -4031,8 +4031,6 @@ let make_macro_api ctx p =
|
|
Interp.on_generate = (fun f ->
|
|
Interp.on_generate = (fun f ->
|
|
Common.add_filter ctx.com (fun() ->
|
|
Common.add_filter ctx.com (fun() ->
|
|
let t = macro_timer ctx "onGenerate" in
|
|
let t = macro_timer ctx "onGenerate" in
|
|
- (* add standard types to current module so basic types can be resolved (issue #1904) *)
|
|
|
|
- ctx.m.module_types <- ctx.m.module_types @ ctx.g.std.m_types;
|
|
|
|
f (List.map make_instance ctx.com.types);
|
|
f (List.map make_instance ctx.com.types);
|
|
t()
|
|
t()
|
|
)
|
|
)
|
|
@@ -4625,6 +4623,8 @@ let rec create com =
|
|
with
|
|
with
|
|
Error (Module_not_found ([],"StdTypes"),_) -> error "Standard library not found" null_pos
|
|
Error (Module_not_found ([],"StdTypes"),_) -> error "Standard library not found" null_pos
|
|
);
|
|
);
|
|
|
|
+ (* We always want core types to be available so we add them as default imports (issue #1904 and #3131). *)
|
|
|
|
+ ctx.m.module_types <- ctx.g.std.m_types;
|
|
List.iter (fun t ->
|
|
List.iter (fun t ->
|
|
match t with
|
|
match t with
|
|
| TAbstractDecl a ->
|
|
| TAbstractDecl a ->
|