Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
Julow committed Jul 11, 2024
1 parent 4571ee9 commit 8c28197
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/odoc/resolver.ml
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ let add_unit_to_cache u =

let lookup_path _ap ~pages ~libs:_ ~hierarchy (kind, tag, path) =
let module Env = Odoc_xref2.Env in
let ( >>= ) x f = match x with Some x' -> f x' | None -> None in
let open Odoc_utils.OptionMonad in
let page_path_to_path path =
(* Turn [foo/bar] into [foo/page-bar.odoc]. *)
let segs =
Expand Down
3 changes: 2 additions & 1 deletion src/xref2/ref_tools.ml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,8 @@ module Path = struct
| `Page p -> Ok p

let page_in_env env (tag, path) : page_lookup_result ref_result =
handle_lookup_errors ~tag ~path (Env.lookup_path (`Page, tag, path) env)
Env.lookup_path (`Page, tag, path) env
|> handle_lookup_errors ~tag ~path
>>= expect_page ~tag ~path
>>= fun p -> Ok (`Identifier p.name, p)

Expand Down

0 comments on commit 8c28197

Please sign in to comment.