Skip to content

Commit 58254c8

Browse files
panglesdjonludlam
authored andcommitted
Driver: improve compile mli
Signed-off-by: Paul-Elliot <[email protected]>
1 parent f4230bd commit 58254c8

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

src/driver/compile.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ let find_partials odoc_dir =
104104
| Ok h -> (h, tbl)
105105
| Error _ -> (* odoc_dir doesn't exist...? *) (Util.StringMap.empty, tbl)
106106

107-
let compile partial ~output_dir ?linked_dir all =
107+
let compile ?partial ~output_dir ?linked_dir all =
108108
let linked_dir = Option.value linked_dir ~default:output_dir in
109109
let hashes = mk_byhash all in
110110
let other_hashes, tbl =

src/driver/compile.mli

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,16 @@ type compiled
33
val init_stats : Packages.set -> unit
44

55
val compile :
6-
Fpath.t option ->
6+
?partial:Fpath.t ->
77
output_dir:Fpath.t ->
88
?linked_dir:Fpath.t ->
99
Packages.set ->
1010
compiled list
11+
(** Use [partial] to reuse the output of a previous call to [compile]. Useful in
12+
the voodoo context.
13+
14+
[output_dir] is the directory for [odoc] file, [linked_dir] is the one for
15+
[odocl] files (defaulting to [output_dir] when absent). *)
1116

1217
type linked
1318

src/driver/odoc_driver.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ let run libs verbose packages_dir odoc_dir odocl_dir html_dir stats nb_workers
537537
Eio.Fiber.both
538538
(fun () ->
539539
let compiled =
540-
Compile.compile partial ~output_dir:odoc_dir ?linked_dir:odocl_dir all
540+
Compile.compile ?partial ~output_dir:odoc_dir ?linked_dir:odocl_dir
541+
all
541542
in
542543
let linked = Compile.link compiled in
543544
let odocl_dir = match odocl_dir with Some l -> l | None -> odoc_dir in

0 commit comments

Comments
 (0)