|
@@ -227,44 +227,20 @@ end
|
|
|
|
|
|
let no_meta = []
|
|
|
|
|
|
-let class_module_type c = {
|
|
|
- t_path = [],"Class<" ^ (s_type_path c.cl_path) ^ ">" ;
|
|
|
- t_module = c.cl_module;
|
|
|
- t_doc = None;
|
|
|
- t_pos = c.cl_pos;
|
|
|
- t_name_pos = null_pos;
|
|
|
- t_type = mk_anon ~fields:c.cl_statics (ref (Statics c));
|
|
|
- t_private = true;
|
|
|
- t_params = [];
|
|
|
- t_using = [];
|
|
|
- t_meta = no_meta;
|
|
|
-}
|
|
|
+let class_module_type c =
|
|
|
+ let path = ([],"Class<" ^ (s_type_path c.cl_path) ^ ">") in
|
|
|
+ let t = mk_anon ~fields:c.cl_statics (ref (Statics c)) in
|
|
|
+ { (mk_typedef c.cl_module path c.cl_pos null_pos t) with t_private = true}
|
|
|
|
|
|
-let enum_module_type m path p = {
|
|
|
- t_path = [], "Enum<" ^ (s_type_path path) ^ ">";
|
|
|
- t_module = m;
|
|
|
- t_doc = None;
|
|
|
- t_pos = p;
|
|
|
- t_name_pos = null_pos;
|
|
|
- t_type = mk_mono();
|
|
|
- t_private = true;
|
|
|
- t_params = [];
|
|
|
- t_using = [];
|
|
|
- t_meta = [];
|
|
|
-}
|
|
|
+let enum_module_type m path p =
|
|
|
+ let path = ([], "Enum<" ^ (s_type_path path) ^ ">") in
|
|
|
+ let t = mk_mono() in
|
|
|
+ {(mk_typedef m path p null_pos t) with t_private = true}
|
|
|
|
|
|
-let abstract_module_type a tl = {
|
|
|
- t_path = [],Printf.sprintf "Abstract<%s%s>" (s_type_path a.a_path) (s_type_params (ref []) tl);
|
|
|
- t_module = a.a_module;
|
|
|
- t_doc = None;
|
|
|
- t_pos = a.a_pos;
|
|
|
- t_name_pos = null_pos;
|
|
|
- t_type = mk_anon (ref (AbstractStatics a));
|
|
|
- t_private = true;
|
|
|
- t_params = [];
|
|
|
- t_using = [];
|
|
|
- t_meta = no_meta;
|
|
|
-}
|
|
|
+let abstract_module_type a tl =
|
|
|
+ let path = ([],Printf.sprintf "Abstract<%s%s>" (s_type_path a.a_path) (s_type_params (ref []) tl)) in
|
|
|
+ let t = mk_anon (ref (AbstractStatics a)) in
|
|
|
+ {(mk_typedef a.a_module path a.a_pos null_pos t) with t_private = true}
|
|
|
|
|
|
module TClass = struct
|
|
|
let get_member_fields' self_too c0 tl =
|