Small improvement
This commit is contained in:
parent
d279e1e25d
commit
e5f27b8ba8
|
@ -7,11 +7,11 @@ type t =
|
|||
; local_libs : Public_lib.t String_map.t
|
||||
}
|
||||
|
||||
let create context stanzas =
|
||||
let create context l ~f =
|
||||
let local_bins, local_libs =
|
||||
List.fold_left stanzas ~init:(String_set.empty, String_map.empty)
|
||||
~f:(fun acc (_dir, stanzas) ->
|
||||
List.fold_left stanzas ~init:acc
|
||||
List.fold_left l ~init:(String_set.empty, String_map.empty)
|
||||
~f:(fun acc x ->
|
||||
List.fold_left (f x) ~init:acc
|
||||
~f:(fun (local_bins, local_libs) stanza ->
|
||||
match (stanza : Stanza.t) with
|
||||
| Install { section = Bin; files; _ } ->
|
||||
|
|
|
@ -2,7 +2,11 @@ open! Import
|
|||
|
||||
type t
|
||||
|
||||
val create : Context.t -> (Path.t * Jbuild.Stanza.t list) list -> t
|
||||
val create
|
||||
: Context.t
|
||||
-> 'a list
|
||||
-> f:('a -> Jbuild.Stanza.t list)
|
||||
-> t
|
||||
|
||||
(** A named artifact that is looked up in the PATH if not found in the tree or
|
||||
[in_the_tree] is [false].
|
||||
|
|
|
@ -147,8 +147,8 @@ let create
|
|||
end)
|
||||
in
|
||||
let artifacts =
|
||||
Artifacts.create context (List.map stanzas ~f:(fun (d : Dir_with_jbuild.t) ->
|
||||
(d.ctx_dir, d.stanzas)))
|
||||
Artifacts.create context stanzas ~f:(fun (d : Dir_with_jbuild.t) ->
|
||||
d.stanzas)
|
||||
in
|
||||
let cxx_flags =
|
||||
String.extract_blank_separated_words context.ocamlc_cflags
|
||||
|
|
Loading…
Reference in New Issue