@@ -31,12 +31,7 @@ let sigItemsExtent items =
3131 loc_end = last.sig_loc.loc_end;
3232 }
3333
34- type env = {
35- stamps : stamps ;
36- processDoc : string -> string list ;
37- modulePath : visibilityPath ;
38- scope : Location .t ;
39- }
34+ type env = {stamps : stamps ; modulePath : visibilityPath ; scope : Location .t }
4035
4136let addItem ~name ~extent ~stamp ~env ~item attributes exported stamps =
4237 let declared =
@@ -47,7 +42,7 @@ let addItem ~name ~extent ~stamp ~env ~item attributes exported stamps =
4742 loc_end = env.scope.loc_end;
4843 loc_ghost = false ;
4944 }
50- ~extent ~name ~stamp ~module Path:env.modulePath ~process Doc:env.processDoc
45+ ~extent ~name ~stamp ~module Path:env.modulePath
5146 (not (Hashtbl. mem exported name.txt))
5247 attributes
5348 in
@@ -117,8 +112,7 @@ let rec forSignatureTypeItem env (exported : SharedTypes.exported) item =
117112 }
118113 ~name: (Location. mknoloc name)
119114 ~stamp (* TODO maybe this needs another child *)
120- ~module Path:env.modulePath
121- ~process Doc:env.processDoc true cd_attributes
115+ ~module Path:env.modulePath true cd_attributes
122116 in
123117 Hashtbl. add env.stamps.constructors stamp declared;
124118 item))
@@ -291,7 +285,7 @@ let forSignature ~env items =
291285 let docstring =
292286 match ProcessAttributes. findDocAttribute attributes with
293287 | None -> []
294- | Some d -> env.processDoc d
288+ | Some d -> [d]
295289 in
296290 {docstring; exported; topLevel}
297291
@@ -402,8 +396,7 @@ and forModule env mod_desc moduleName =
402396 loc_end = env.scope.loc_end;
403397 loc_ghost = false ;
404398 }
405- ~extent: t.Typedtree. mty_loc ~stamp ~module Path:NotVisible
406- ~process Doc:env.processDoc false []
399+ ~extent: t.Typedtree. mty_loc ~stamp ~module Path:NotVisible false []
407400 in
408401 Hashtbl. add env.stamps.modules stamp declared));
409402 forModule env resultExpr.mod_desc moduleName
@@ -441,12 +434,11 @@ and forStructure ~env items =
441434 let docstring =
442435 match ProcessAttributes. findDocAttribute attributes with
443436 | None -> []
444- | Some d -> env.processDoc d
437+ | Some d -> [d]
445438 in
446439 {docstring; exported; topLevel}
447440
448- let forCmt ~moduleName ~uri processDoc
449- ({cmt_modname; cmt_annots} : Cmt_format.cmt_infos ) =
441+ let forCmt ~moduleName ~uri ({cmt_modname; cmt_annots} : Cmt_format.cmt_infos ) =
450442 match cmt_annots with
451443 | Partial_implementation parts ->
452444 let items =
@@ -474,7 +466,6 @@ let forCmt ~moduleName ~uri processDoc
474466 {
475467 scope = extent;
476468 stamps = initStamps () ;
477- processDoc;
478469 modulePath = File (uri, moduleName);
479470 }
480471 in
@@ -494,7 +485,6 @@ let forCmt ~moduleName ~uri processDoc
494485 {
495486 scope = sigItemsExtent items;
496487 stamps = initStamps () ;
497- processDoc;
498488 modulePath = File (uri, moduleName);
499489 }
500490 in
@@ -505,7 +495,6 @@ let forCmt ~moduleName ~uri processDoc
505495 {
506496 scope = itemsExtent structure.str_items;
507497 stamps = initStamps () ;
508- processDoc;
509498 modulePath = File (uri, moduleName);
510499 }
511500 in
@@ -516,7 +505,6 @@ let forCmt ~moduleName ~uri processDoc
516505 {
517506 scope = sigItemsExtent signature.sig_items;
518507 stamps = initStamps () ;
519- processDoc;
520508 modulePath = File (uri, moduleName);
521509 }
522510 in
0 commit comments