From e638c04cb2cb9643b4c310989bf4397775d0673f Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Thu, 1 Mar 2018 20:16:29 +0000 Subject: [PATCH] Add Jbuild.Lib_deps.of_pps --- src/jbuild.ml | 3 +++ src/jbuild.mli | 1 + 2 files changed, 4 insertions(+) diff --git a/src/jbuild.ml b/src/jbuild.ml index df692fb0..d3fd4581 100644 --- a/src/jbuild.ml +++ b/src/jbuild.ml @@ -470,6 +470,9 @@ module Lib_deps = struct String_set.fold c.forbidden ~init:acc ~f:(add Forbidden))) : kind String_map.t); t + + let of_pps pps = + List.map pps ~f:(fun pp -> Lib_dep.of_pp (Loc.none, pp)) end module Buildable = struct diff --git a/src/jbuild.mli b/src/jbuild.mli index a5fa3a9c..3aab2242 100644 --- a/src/jbuild.mli +++ b/src/jbuild.mli @@ -116,6 +116,7 @@ end module Lib_deps : sig type t = Lib_dep.t list + val of_pps : Pp.t list -> t end module Dep_conf : sig