On Tue, Mar 3, 2015 at 10:02 AM, François 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 () = > 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 = 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çois >