@@ -10,7 +10,7 @@ type annotations =
10
10
| DefJmp of Shape.Uid .t
11
11
12
12
module Analysis = struct
13
- let (@ ) = List. rev_append
13
+ let ( @ ) = List. rev_append
14
14
15
15
open Typedtree
16
16
open Odoc_model.Paths
@@ -161,7 +161,8 @@ module Analysis = struct
161
161
(* Only generate anchor if the uid is in the location table. We don't
162
162
link to modules outside of the compilation unit. *)
163
163
match
164
- Shape.Uid.Tbl. find_opt (get_uid_to_loc env) value_description.val_uid
164
+ Shape.Uid.Tbl. find_opt (get_uid_to_loc env)
165
+ value_description.val_uid
165
166
with
166
167
| Some _ -> [ (DefJmp value_description.val_uid, pos_of_loc exp_loc) ]
167
168
| None -> (
@@ -178,16 +179,18 @@ module Analysis = struct
178
179
expression env e @ List. concat_map (case env) cases
179
180
| { exp_desc = Texp_tuple es ; _ } -> List. concat_map (expression env) es
180
181
| { exp_desc = Texp_construct (_ , cons_description , es ); exp_loc; _ } ->
181
- let x =
182
- if exp_loc.loc_ghost then []
183
- else
184
- match
185
- Shape.Uid.Tbl. find_opt (get_uid_to_loc env) cons_description.cstr_uid
186
- with
187
- | Some _ -> [ (DefJmp cons_description.cstr_uid, pos_of_loc exp_loc) ]
188
- | None -> []
189
- in
190
- x @ List. concat_map (expression env) es
182
+ let x =
183
+ if exp_loc.loc_ghost then []
184
+ else
185
+ match
186
+ Shape.Uid.Tbl. find_opt (get_uid_to_loc env)
187
+ cons_description.cstr_uid
188
+ with
189
+ | Some _ ->
190
+ [ (DefJmp cons_description.cstr_uid, pos_of_loc exp_loc) ]
191
+ | None -> []
192
+ in
193
+ x @ List. concat_map (expression env) es
191
194
| { exp_desc = Texp_variant (_ , Some e ); _ } -> expression env e
192
195
| { exp_desc = Texp_variant (_ , None); _ } -> []
193
196
| { exp_desc = Texp_record { fields; extended_expression; _ } ; _ } ->
@@ -321,12 +324,12 @@ module Analysis = struct
321
324
in
322
325
res
323
326
| Tmod_constraint (me , _ , constr , _ ) ->
324
- let c =
325
- match constr with
326
- Tmodtype_implicit -> []
327
- | Tmodtype_explicit mt -> module_type env parent mt
328
- in
329
- c @ module_expr env parent me
327
+ let c =
328
+ match constr with
329
+ | Tmodtype_implicit -> []
330
+ | Tmodtype_explicit mt -> module_type env parent mt
331
+ in
332
+ c @ module_expr env parent me
330
333
| _ -> []
331
334
332
335
and unwrap_module_expr_desc = function
0 commit comments