From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 8FABC7FC41 for ; Tue, 3 Mar 2015 16:25:04 +0100 (CET) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sebastien.mondet@gmail.com) identity=pra; client-ip=209.85.215.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sebastien.mondet@gmail.com"; x-sender="sebastien.mondet@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of sebastien.mondet@gmail.com designates 209.85.215.44 as permitted sender) identity=mailfrom; client-ip=209.85.215.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sebastien.mondet@gmail.com"; x-sender="sebastien.mondet@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-la0-f44.google.com) identity=helo; client-ip=209.85.215.44; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="sebastien.mondet@gmail.com"; x-sender="postmaster@mail-la0-f44.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0A7AgBy0fVUmyzXVdFag1RaBIMHu1uCZIVuAoEhB00BAQEBAQEQAQEBAQEGCwsJFC6EDwEBAQMBEhEEGQEbHQEDAQsGBQQHDSoCAiIBEQEFARwGEyKHeAEDCQgNr1I+MYsugWuCd49wChknDVSESgEBAQEBAQEBAQEBAQEBAQEBARQBAQQOiwSCYYIJBAeCaIFDBYpdiHyFaZIVEiOBDAmBfoIxIDGCQwEBAQ X-IPAS-Result: A0A7AgBy0fVUmyzXVdFag1RaBIMHu1uCZIVuAoEhB00BAQEBAQEQAQEBAQEGCwsJFC6EDwEBAQMBEhEEGQEbHQEDAQsGBQQHDSoCAiIBEQEFARwGEyKHeAEDCQgNr1I+MYsugWuCd49wChknDVSESgEBAQEBAQEBAQEBAQEBAQEBARQBAQQOiwSCYYIJBAeCaIFDBYpdiHyFaZIVEiOBDAmBfoIxIDGCQwEBAQ X-IronPort-AV: E=Sophos;i="5.09,682,1418079600"; d="scan'208";a="101964096" Received: from mail-la0-f44.google.com ([209.85.215.44]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 03 Mar 2015 16:25:03 +0100 Received: by lamq1 with SMTP id q1so14981180lam.9 for ; Tue, 03 Mar 2015 07:25:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=ZT+kCqJYZk4fkhHMM9rshDdAnPL+SSIe9t5o9EbRP4w=; b=IulAM1x/GzEGsR8upi0Nym1pMiwg8squwlerM9whTDH3CRpEPuSV0nxR9UJL5/iBaA FOqDWfOaXqwIryv61OUhXLwC6u5y/RTV+DqMBDqf3DCB3ZNZnGb5vPVpKk7BifDOoERy kPbavBKKXmAEytwJY1iVP7wURsobLtmH9HiPTxMVNIXcqjWANgAeiAG3eHOp0iwTOHJ6 BSSJzPj/8wNeUFxvn+FkZnTuAyEE4TchqQtLiDXzyKalAT6ZMkGVtcAvoKgY4ExCYWkV OGDgwu2w+n4hAcLnAUfBejDrQ8rmB5phd3E14EpSzsa3NwplY+CIQQahPsgYGGUWlNbF KBqQ== X-Received: by 10.152.116.43 with SMTP id jt11mr28822412lab.30.1425396303394; Tue, 03 Mar 2015 07:25:03 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.42.74 with HTTP; Tue, 3 Mar 2015 07:24:43 -0800 (PST) In-Reply-To: <54F5CD0C.4080303@cea.fr> References: <54F5B3F7.3030705@cea.fr> <54F5C3E6.8010404@cea.fr> <54F5CD0C.4080303@cea.fr> From: Sebastien Mondet Date: Tue, 3 Mar 2015 10:24:43 -0500 Message-ID: To: =?UTF-8?Q?Fran=C3=A7ois_Bobot?= Cc: Ivan Gotovchits , Gabriel Scherer , OCaml Mailing List Content-Type: multipart/alternative; boundary=001a11c3656853fb62051063f02f Subject: Re: [Caml-list] Dependencies between plugins --001a11c3656853fb62051063f02f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Tue, Mar 3, 2015 at 10:02 AM, Fran=C3=A7ois Bobot wrote: > On 03/03/2015 15:42, Sebastien Mondet wrote: > >> >> We have also some code doing that there: >> https://github.com/hammerlab/ketrew/blob/master/src/lib/ >> pure/ketrew_plugin.ml#L52 >> One of the tricks used is that, at configure time, the list of findlib >> packages already linked is >> given to the library itself to avoid double loading. >> > > Thanks for the link! I like the use of findlib for computing the set of > package already linked! > > ``` > let ketrew_deep_ancestors () =3D > Lazy.force (lazy ( > Findlib.package_deep_ancestors ["native"] Ketrew_metadata.findlib_ > packages > )) > ``` > > PS: I think that `fun () -> Lazy.force (lazy e)` is equivalent to `fun () > -> e`. > You surely wanted `let l =3D lazy e in fun () -> Lazy.force l`, no? > > ah yes, that used to be a try-to-work-around "unbound type variables" that I didn't clean-up > -- > Fran=C3=A7ois > --001a11c3656853fb62051063f02f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Tue, Mar 3, 2015 at 10:02 AM, Fran=C3=A7ois Bobot = <francois.bob= ot@cea.fr> wrote:
On= 03/03/2015 15:42, Sebastien Mondet wrote:

We have also some code doing that there:
https://github.com/hammerlab/ke= trew/blob/master/src/lib/pure/ketrew_plugin.ml#L52
One of the tricks used is that, at configure time, the list of findlib pack= ages already linked is
given to the library itself to avoid double loading.

Thanks for the link! I like the use of findlib for computing the set of pac= kage already linked!

```
let ketrew_deep_ancestors () =3D
=C2=A0 Lazy.force (lazy (
=C2=A0 =C2=A0Findlib.package_deep_ancestors ["native"] Ketrew_met= adata.findlib_packages
=C2=A0 ))
```

PS: I think that `fun () -> Lazy.force (lazy e)` is equivalent to `fun (= ) -> e`.
You surely wanted `let l =3D lazy e in fun () -> Lazy.force l`, no?


ah yes, that used to be = a try-to-work-around "unbound type variables" that I didn't c= lean-up


=C2=A0
--
Fran=C3=A7ois

--001a11c3656853fb62051063f02f--