Skip to content

Commit 9cf80ab

Browse files
committed
Remove now unused handle_file function
This function was used by sherlodoc, it is not anymore.
1 parent 3b53164 commit 9cf80ab

File tree

2 files changed

+0
-26
lines changed

2 files changed

+0
-26
lines changed

src/odoc/indexing.ml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,6 @@ open Odoc_model
77
module H = Odoc_model.Paths.Identifier.Hashtbl.Any
88
module Id = Odoc_model.Paths.Identifier
99

10-
let handle_file file ~unit ~page ~occ =
11-
match Fpath.basename file with
12-
| s when String.is_prefix ~affix:"index-" s ->
13-
Odoc_file.load_index file >>= fun index -> Ok (occ index)
14-
| _ -> (
15-
Odoc_file.load file >>= fun unit' ->
16-
match unit' with
17-
| { Odoc_file.content = Unit_content unit'; _ } when unit'.hidden ->
18-
Error (`Msg "Hidden units are ignored when generating an index")
19-
| { Odoc_file.content = Unit_content unit'; _ } -> Ok (unit unit')
20-
| { Odoc_file.content = Page_content page'; _ } -> Ok (page page')
21-
| _ ->
22-
Error
23-
(`Msg
24-
"Only pages and unit are allowed as input when generating an \
25-
index"))
26-
2710
let parse_input_file input =
2811
let is_sep = function '\n' | '\r' -> true | _ -> false in
2912
Fs.File.read input >>= fun content ->

src/odoc/indexing.mli

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
open Or_error
22

3-
val handle_file :
4-
Fpath.t ->
5-
unit:(Odoc_model.Lang.Compilation_unit.t -> 'a) ->
6-
page:(Odoc_model.Lang.Page.t -> 'a) ->
7-
occ:(Odoc_index.Skeleton.t list -> 'a) ->
8-
('a, [> msg ]) result
9-
(** This function is exposed for custom indexers that uses [odoc] as a library
10-
to generate their search index *)
11-
123
val compile :
134
[ `JSON | `Marshall ] ->
145
output:Fs.file ->

0 commit comments

Comments
 (0)