Skip to content

Commit 1ef487d

Browse files
panglesdjonludlam
authored andcommitted
Occurrences: style improvements
Signed-off-by: Paul-Elliot <[email protected]>
1 parent ebf1a3a commit 1ef487d

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

src/document/generator.ml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,7 @@ module Make (Syntax : SYNTAX) = struct
252252
let path id = Url.Path.from_identifier id
253253
let url id = Url.from_path (path id)
254254

255-
let to_link documentation implementation =
255+
let to_link {Lang.Source_info.documentation; implementation} =
256256
let documentation =
257257
let open Paths.Path.Resolved in
258258
match documentation with
@@ -281,13 +281,12 @@ module Make (Syntax : SYNTAX) = struct
281281
| `SourceLocationInternal (_, local) ->
282282
Some (Anchor (LocalName.to_string local))
283283
| _ -> None)
284-
| Module { documentation; _ } -> to_link documentation None
285-
| ModuleType { documentation; _ } -> to_link documentation None
286-
| Type { documentation; _ } -> to_link documentation None
287-
| ClassType { documentation; _ } -> to_link documentation None
288-
| Value { documentation; implementation } ->
289-
to_link documentation implementation
290-
| Constructor { documentation; _ } -> to_link documentation None
284+
| Module v -> to_link v
285+
| ModuleType v -> to_link v
286+
| Type v -> to_link v
287+
| ClassType v -> to_link v
288+
| Value v -> to_link v
289+
| Constructor v -> to_link v
291290

292291
let source id syntax_info infos source_code =
293292
let url = path id in

src/xref2/link.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ let rec unit env t =
429429
let source_info =
430430
let env =
431431
match t.content with
432-
| Module sg -> Env.open_signature sg env |> Env.add_docs sg.doc
432+
| Module sg -> Env.open_signature sg env
433433
| Pack _ -> env
434434
in
435435
let open Source_info in

0 commit comments

Comments
 (0)