File tree Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Expand file tree Collapse file tree 2 files changed +10
-16
lines changed Original file line number Diff line number Diff line change 2
2
3
3
type ty = Module of Packages .modulety | Mld of Packages .mld
4
4
5
+ type impl = { impl : Fpath .t ; src : Fpath .t }
6
+
5
7
type compiled = {
6
8
m : ty ;
7
9
output_dir : Fpath .t ;
8
10
output_file : Fpath .t ;
9
11
include_dirs : Fpath.Set .t ;
10
- impl : ( Fpath .t * Fpath .t ) option ;
12
+ impl : impl option ;
11
13
}
12
14
13
15
let mk_byhash (pkgs : Packages.t Util.StringMap.t ) =
@@ -100,7 +102,7 @@ let compile output_dir all =
100
102
Odoc. compile_impl ~output_dir ~input_file: impl.mip_path
101
103
~includes ~parent_id: impl.mip_parent_id ~source_id: si.src_id;
102
104
Atomic. incr Stats. stats.compiled_impls;
103
- Some ( output_file, si.src_path)
105
+ Some { impl = output_file; src = si.src_path }
104
106
| None -> None )
105
107
| None -> None
106
108
in
@@ -168,11 +170,11 @@ let link : compiled list -> _ =
168
170
let includes = Fpath.Set. add c.output_dir c.include_dirs in
169
171
let impl =
170
172
match c.impl with
171
- | Some ( x , y ) ->
172
- Logs. debug (fun m -> m " Linking impl: %a" Fpath. pp x );
173
- Odoc. link ~input_file: x ~includes () ;
173
+ | Some { impl; src } ->
174
+ Logs. debug (fun m -> m " Linking impl: %a" Fpath. pp impl );
175
+ Odoc. link ~input_file: impl ~includes () ;
174
176
Atomic. incr Stats. stats.linked_impls;
175
- [ { output_file = Fpath. (set_ext " odocl" x ); src = Some y } ]
177
+ [ { output_file = Fpath. (set_ext " odocl" impl ); src = Some src } ]
176
178
| None -> []
177
179
in
178
180
match c.m with
Original file line number Diff line number Diff line change 1
- type ty = Module of Packages .modulety | Mld of Packages .mld
2
-
3
- type compiled = {
4
- m : ty ;
5
- output_dir : Fpath .t ;
6
- output_file : Fpath .t ;
7
- include_dirs : Fpath.Set .t ;
8
- impl : (Fpath .t * Fpath .t ) option ;
9
- }
1
+ type compiled
10
2
11
3
val init_stats : Packages .set -> unit
12
4
13
5
val compile : Fpath .t -> Packages .set -> compiled list
14
6
15
- type linked = { output_file : Fpath .t ; src : Fpath .t option }
7
+ type linked
16
8
17
9
val link : compiled list -> linked list
18
10
You can’t perform that action at this time.
0 commit comments