Skip to content

Commit 5f606a4

Browse files
panglesdjonludlam
authored andcommitted
ocamlformat
Signed-off-by: Paul-Elliot <[email protected]>
1 parent 71218c8 commit 5f606a4

File tree

1 file changed

+21
-18
lines changed

1 file changed

+21
-18
lines changed

src/loader/implementation.ml

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type annotations =
1010
| DefJmp of Shape.Uid.t
1111

1212
module Analysis = struct
13-
let (@) = List.rev_append
13+
let ( @ ) = List.rev_append
1414

1515
open Typedtree
1616
open Odoc_model.Paths
@@ -161,7 +161,8 @@ module Analysis = struct
161161
(* Only generate anchor if the uid is in the location table. We don't
162162
link to modules outside of the compilation unit. *)
163163
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
165166
with
166167
| Some _ -> [ (DefJmp value_description.val_uid, pos_of_loc exp_loc) ]
167168
| None -> (
@@ -178,16 +179,18 @@ module Analysis = struct
178179
expression env e @ List.concat_map (case env) cases
179180
| { exp_desc = Texp_tuple es; _ } -> List.concat_map (expression env) es
180181
| { 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
191194
| { exp_desc = Texp_variant (_, Some e); _ } -> expression env e
192195
| { exp_desc = Texp_variant (_, None); _ } -> []
193196
| { exp_desc = Texp_record { fields; extended_expression; _ }; _ } ->
@@ -321,12 +324,12 @@ module Analysis = struct
321324
in
322325
res
323326
| 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
330333
| _ -> []
331334

332335
and unwrap_module_expr_desc = function

0 commit comments

Comments
 (0)