We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8b5e1b5 commit de6ada7Copy full SHA for de6ada7
src/odoc/occurrences.ml
@@ -1,11 +1,12 @@
1
open Or_error
2
3
let handle_file file ~f =
4
- Odoc_file.load file
5
- |> Result.map @@ fun unit' ->
6
- match unit' with
7
- | { Odoc_file.content = Unit_content unit; _ } -> Some (f unit)
8
- | _ -> None
+ Odoc_file.load file |> function
+ | Error _ as e -> e
+ | Ok unit' -> (
+ match unit' with
+ | { Odoc_file.content = Unit_content unit; _ } -> Ok (Some (f unit))
9
+ | _ -> Ok None)
10
11
let fold_dirs ~dirs ~f ~init =
12
dirs
0 commit comments