From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 814137FB5D for ; Fri, 2 Jan 2015 19:11:50 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=pra; client-ip=212.227.17.13; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of info@gerd-stolpmann.de) identity=mailfrom; client-ip=212.227.17.13; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="info@gerd-stolpmann.de"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mout.kundenserver.de) identity=helo; client-ip=212.227.17.13; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="info@gerd-stolpmann.de"; x-sender="postmaster@mout.kundenserver.de"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al4AAAPfplTU4xENnGdsb2JhbABcgxs9WMYrBoV1AoEFFgEBAQEBEQEBAQEBBg0JCRQuhA0BBVUkEAsOHxlXBhMJiCcJq20hbw2SYgEBAQEBAQEDAQEBAQEdj1EmBwqCIwxAgTAFhSeJJQGIO4ENhHQDiBODOYQRbgGCQgEBAQ X-IPAS-Result: Al4AAAPfplTU4xENnGdsb2JhbABcgxs9WMYrBoV1AoEFFgEBAQEBEQEBAQEBBg0JCRQuhA0BBVUkEAsOHxlXBhMJiCcJq20hbw2SYgEBAQEBAQEDAQEBAQEdj1EmBwqCIwxAgTAFhSeJJQGIO4ENhHQDiBODOYQRbgGCQgEBAQ X-IronPort-AV: E=Sophos;i="5.07,685,1413237600"; d="asc'?scan'208";a="115450369" Received: from mout.kundenserver.de ([212.227.17.13]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 02 Jan 2015 19:11:50 +0100 Received: from office1.lan.sumadev.de ([178.4.25.238]) by mrelayeu.kundenserver.de (mreue103) with ESMTPSA (Nemesis) id 0MZwSd-1YPRhU3Cc3-00LpLg; Fri, 02 Jan 2015 19:11:47 +0100 Received: from [192.168.65.10] (unknown [192.168.65.10]) by office1.lan.sumadev.de (Postfix) with ESMTPSA id 84BCDDC05D; Fri, 2 Jan 2015 19:11:46 +0100 (CET) Message-ID: <1420222298.12521.72.camel@e130.lan.sumadev.de> From: Gerd Stolpmann To: Remco Vermeulen Cc: caml-list@inria.fr Date: Fri, 02 Jan 2015 19:11:38 +0100 In-Reply-To: <1088B954-0D62-47D9-B727-2ADE38DD3949@vu.nl> References: <1088B954-0D62-47D9-B727-2ADE38DD3949@vu.nl> Content-Type: multipart/signed; micalg="pgp-sha1"; protocol="application/pgp-signature"; boundary="=-TLTZ7Sui5Q5eIO8Lfu2w" X-Mailer: Evolution 3.10.4-0ubuntu2 Mime-Version: 1.0 X-Provags-ID: V03:K0:sWujHJ5hQ8DwQyq6gdwtDBrt5vjwNX7ItZgI/0PAE/tnVFPY9yz 4SUmzKomAX+9BAfqBALPQXRIbcVe2W+HF473gP2FNj7HzLFWHjg0579RmlKA1eZqHESmQla zCWe5Ud+r/WUxvJGX3Qz8NhyukEI75KjOzUuWA6R9NF7TSChsedyWZKETMJoXQKqVXVcD5y kaEfZFUx7qR0yBXWsfMOQ== X-UI-Out-Filterresults: notjunk:1; Subject: Re: [Caml-list] ocamldep & compilation units --=-TLTZ7Sui5Q5eIO8Lfu2w Content-Type: text/plain; charset="ISO-8859-15" Content-Transfer-Encoding: quoted-printable Am Freitag, den 02.01.2015, 15:03 +0100 schrieb Remco Vermeulen: > So my question is. is BAR in the above example correctly identified as a = compilation unit by ocamldep? The syntax doesn't allow an unambiguous identification, so ocamldep needs to take into account that BAR is a compilation unit. It doesn't follow "open" when doing this, and I guess this is the point that confuses you. The problem is that "ocamldep -modules" by definition can only analyze a single module. The output is imprecise, however, and possible inter-module effects are not taken into account (among other things). A precise output would list BAR with the exception that it might be shadowed by Foo. But imagine now we had the information with this degree of detail. As omake wants to figure out the dependencies it would have to solve a puzzle. In your case it is easily to solve, but in practice there are often several "open" directives, and in this case you don't even know whether "open Foo" opens a compilation unit. I am not sure whether a well-performing algorithm even exists (did anybody tackle this problem?). The workaround is to use naming schemes that allow you to clearly distinguish between local modules and compilation unit (e.g. all your local modules have 1-3 characters, and all compilation units have longer names). Gerd --=20 ------------------------------------------------------------ Gerd Stolpmann, Darmstadt, Germany gerd@gerd-stolpmann.de My OCaml site: http://www.camlcity.org Contact details: http://www.camlcity.org/contact.html Company homepage: http://www.gerd-stolpmann.de ------------------------------------------------------------ --=-TLTZ7Sui5Q5eIO8Lfu2w Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAABAgAGBQJUpt9aAAoJEAaM4b9ZLB5TIOoH/2En8uh0Epz24Azet4gS1IMX kxd0hDwrt1RRus1Exz9X16C7c7Dpgv/R+5VANoOFx0SwBKEMTcpV26rXGC0Uv4OQ 5E5UiAdqLvArruw6ylj8EFYgAQPqB+EAwQCi/P1nLNYZCtjN2TX1LLiD7RChxjV2 Q1Vioc+om7FpglB2oSWKQcr3R2nlCxofaiW6kcZ3egwdfzCL6wVuLCnn9J5myrle pIlHLhLuc3Yg+lQ9zsks4fy0Tbv9Oj3qrdO/Ke8d30UbqXZL2mC5QQzjMrkclhOD PmgLdIRtimjmMGsfU9ejLJilEm6ZzC4/9iAr2eCXS/mv0PU3r+qepuxEQpO4I/U= =F3JJ -----END PGP SIGNATURE----- --=-TLTZ7Sui5Q5eIO8Lfu2w--