@@ -141,10 +141,10 @@ module UidHashtbl = Shape.Uid.Tbl
141
141
142
142
(* Adds the local definitions found in traverse infos to the [loc_to_id] and
143
143
[ident_to_id] tables. *)
144
- let populate_local_defs source_id poses loc_to_id ident_to_loc =
144
+ let populate_local_defs source_id poses loc_to_id local_ident_to_loc =
145
145
List. iter
146
146
(function
147
- | Typedtree_traverse.Analysis. Definition id , loc ->
147
+ | Typedtree_traverse.Analysis. LocalDefinition id , loc ->
148
148
let name =
149
149
Odoc_model.Names.LocalName. make_std
150
150
(Printf. sprintf " local_%s_%d" (Ident. name id) (counter () ))
@@ -157,7 +157,7 @@ let populate_local_defs source_id poses loc_to_id ident_to_loc =
157
157
LocHashtbl. add loc_to_id loc identifier
158
158
| None -> ()
159
159
);
160
- IdentHashtbl. add ident_to_loc id loc;
160
+ IdentHashtbl. add local_ident_to_loc id loc;
161
161
| _ -> () )
162
162
poses
163
163
@@ -281,13 +281,13 @@ let (>>=) a b = Option.map b a
281
281
282
282
(* Extract [Typedtree_traverse] occurrence information and turn them into proper
283
283
source infos *)
284
- let process_occurrences env poses loc_to_id ident_to_loc =
284
+ let process_occurrences env poses loc_to_id local_ident_to_loc =
285
285
let open Odoc_model.Lang.Source_info in
286
286
let process p find_in_env =
287
287
match p with
288
- | Path. Pident id when IdentHashtbl. mem ident_to_loc id -> (
288
+ | Path. Pident id when IdentHashtbl. mem local_ident_to_loc id -> (
289
289
match
290
- LocHashtbl. find_opt loc_to_id (IdentHashtbl. find ident_to_loc id)
290
+ LocHashtbl. find_opt loc_to_id (IdentHashtbl. find local_ident_to_loc id)
291
291
with
292
292
| None -> None
293
293
| Some id ->
@@ -321,7 +321,7 @@ let process_occurrences env poses loc_to_id ident_to_loc =
321
321
| Constructor _p , loc ->
322
322
(* process p Ident_env.Path.read_constructor *) None >> = fun l ->
323
323
(Constructor l, pos_of_loc loc)
324
- | Definition _ , _ -> None )
324
+ | LocalDefinition _ , _ -> None )
325
325
poses
326
326
327
327
@@ -348,15 +348,15 @@ let read_cmt_infos source_id_opt id cmt_info ~count_occurrences =
348
348
not modify the anchors for existing anchors. *)
349
349
in
350
350
let loc_to_id = LocHashtbl. create 10
351
- and ident_to_loc = IdentHashtbl. create 10
351
+ and local_ident_to_loc = IdentHashtbl. create 10
352
352
and uid_to_id = UidHashtbl. create 10 in
353
353
let () =
354
354
(* populate [loc_to_id], [ident_to_id] and [uid_to_id] *)
355
- populate_local_defs source_id traverse_infos loc_to_id ident_to_loc ;
355
+ populate_local_defs source_id traverse_infos loc_to_id local_ident_to_loc ;
356
356
populate_global_defs env source_id loc_to_id uid_to_loc uid_to_id
357
357
in
358
358
let source_infos =
359
- process_occurrences env traverse_infos loc_to_id ident_to_loc
359
+ process_occurrences env traverse_infos loc_to_id local_ident_to_loc
360
360
|> add_definitions loc_to_id
361
361
in
362
362
( Some (shape, Shape.Uid.Tbl. to_map uid_to_id),
0 commit comments