@@ -628,11 +628,7 @@ let strengthen =
628628 module_type ,
629629 );
630630
631- let md = (md_type, md_filepath) => {
632- md_type,
633- md_filepath,
634- md_loc: Location . dummy_loc,
635- };
631+ let md = (md_type, md_filepath, md_loc) => {md_type, md_filepath, md_loc};
636632
637633let subst_modtype_maker = ((subst, md)) =>
638634 if (subst === Subst . identity) {
@@ -1072,7 +1068,11 @@ let find_module = (path, filename, env) =>
10721068 let filename = Option . value(~default= Ident . name(id), filename);
10731069 if (Ident . persistent(id) && ! (filename == unit_source)) {
10741070 let ps = find_pers_struct(~loc= Location . dummy_loc, filename);
1075- md(TModSignature (Lazy . force(ps. ps_sig)), Some (filename));
1071+ md(
1072+ TModSignature (Lazy . force(ps. ps_sig)),
1073+ Some (filename),
1074+ Location . dummy_loc,
1075+ );
10761076 } else {
10771077 raise (Not_found );
10781078 };
@@ -1926,8 +1926,8 @@ let add_module_declaration = (~arg=false, ~check, id, md, env) => {
19261926
19271927and add_modtype = (id, info, env) => store_modtype(id, info, env);
19281928
1929- let add_module = (~arg=?, id, mty, mf, env) =>
1930- add_module_declaration(~check= false , ~arg? , id, md(mty, mf), env);
1929+ let add_module = (~arg=?, id, mty, mf, mloc , env) =>
1930+ add_module_declaration(~check= false , ~arg? , id, md(mty, mf, mloc ), env);
19311931
19321932let add_constructor = (id, desc, {constructors, _} as e) => {
19331933 ... e,
@@ -1968,9 +1968,9 @@ and enter_module_declaration = (~arg=?, id, md, env) =>
19681968 (id, add_functor_arg ?arg id env) */
19691969and enter_modtype = enter(store_modtype);
19701970
1971- let enter_module = (~arg=?, s, mty, env) => {
1971+ let enter_module = (~arg=?, s, mty, mloc , env) => {
19721972 let id = Ident . create(s);
1973- (id, enter_module_declaration(~arg? , id, md(mty, None ), env));
1973+ (id, enter_module_declaration(~arg? , id, md(mty, None , mloc ), env));
19741974};
19751975
19761976/* Insertion of all components of a signature */
@@ -2077,7 +2077,7 @@ let include_module = (mod_name, mod_: Parsetree.include_declaration, env0) => {
20772077 env0;
20782078 } else {
20792079 let mod_type = TModAlias (path);
2080- env0 |> add_module(mod_ident, mod_type, filename);
2080+ env0 |> add_module(mod_ident, mod_type, filename, mod_ . pinc_loc );
20812081 }
20822082 | _ =>
20832083 let {ps_sig} = find_pers_struct(~loc= mod_. pinc_loc, mod_. pinc_path. txt);
@@ -2089,7 +2089,7 @@ let include_module = (mod_name, mod_: Parsetree.include_declaration, env0) => {
20892089 {mtd_type: Some (mod_type), mtd_loc: mod_. pinc_loc},
20902090 env0,
20912091 )
2092- |> add_module(mod_ident, mod_type, filename);
2092+ |> add_module(mod_ident, mod_type, filename, mod_ . pinc_loc );
20932093 };
20942094};
20952095
0 commit comments