Commits

camlspotter  committed 57533dd

module >>A<< and module type >>A<< have types now

  • Participants
  • Parent commits da29e40
  • Branches dev

Comments (0)

Files changed (1)

             record_def loc (AStr_exception id);
             record_use loc' K.Exception path
         | Tstr_module (id, {loc}, mexp) -> 
+            record loc (Mod_type mexp.mod_type);
             record_def loc (AStr_module (id, module_expr mexp))
         | Tstr_recmodule lst ->
             List.iter (fun (id, {loc}, _mty, mexp) ->
+              record loc (Mod_type mexp.mod_type);
               record_def loc (AStr_module (id, module_expr mexp))) lst
         | Tstr_modtype (id, {loc}, mty) -> 
             record_def loc (AStr_modtype (id, module_type mty))
             List.iter (fun (id, {loc}, _) -> 
               record_def loc (AStr_type id)) lst
         | Tsig_exception (id, {loc}, _) -> record_def loc (AStr_exception id)
-        | Tsig_module (id, {loc}, mty) -> record_def loc (AStr_module (id, module_type mty))
+        | Tsig_module (id, {loc}, mty) -> 
+            record loc (Mod_type mty.mty_type);
+            record_def loc (AStr_module (id, module_type mty))
         | Tsig_recmodule lst -> 
             List.iter (fun (id, {loc}, mty) -> 
+              record loc (Mod_type mty.mty_type);
               record_def loc (AStr_module (id, module_type mty))) lst
         | Tsig_modtype (id, {loc}, mtd) -> 
             record_def loc (AStr_modtype (id, modtype_declaration mtd))
       let tbl = Hashtbl.create 1023 in
       let o = new Record.fold tbl in
       ignore (o#structure str);
+      Debug.format "structure recorded: %d records@." (Hashtbl.length tbl);
       tbl)
       ()
 
       let tbl = Hashtbl.create 1023 in
       let o = new Record.fold tbl in
       ignore (o#signature sg);
+      Debug.format "signature recorded: %d records@." (Hashtbl.length tbl);
       tbl)
       ()