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 6B4407FF50 for ; Mon, 8 Aug 2016 20:30:09 +0200 (CEST) IronPort-PHdr: 9a23:PWVCERSqLB4x+SsXO4Fu6Cvivdpsv+yvbD5Q0YIujvd0So/mwa65ZhCN2/xhgRfzUJnB7Loc0qyN4vimCDRLuM/Z+Fk5M7V0HycfjssXmwFySOWkMmbcaMDQUiohAc5ZX0Vk9XzoeWJcGcL5ekGA6ibqtW1aJBzzOEJPK/jvHcaK1oLshrj0qsWYOlwQzBOGIppKZC2sqgvQssREyaBDEY0WjiXzn31TZu5NznlpL1/A1zz158O34YIxu38I46Fp34d6XK77Z6U1S6BDRHRjajhtpZ6jiR6WBw6I4WAbTm4+nR9BAgyD5xb/FN+ltyz9re1h0wGVOMT3SfY/XjH0q+9EQRXyiSoDfwUy8GzNh9Y42K1Sqgigqhg52IXUbZuYLtJxe6rceZURQm8XDehLUCkULoqibodHJu4FJuFAt8Gpq0EH6B2zGhKEAe7zwyRUj3T1m6Y91rJyQkn9wAU8EodW4zzvp9LvOfJXCLjtwQ== Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=dra-news@metastack.com; spf=Pass smtp.mailfrom=dra-news@metastack.com; spf=None smtp.helo=postmaster@outmail148114.authsmtp.net Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dra-news@metastack.com) identity=pra; client-ip=62.13.148.114; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of dra-news@metastack.com designates 62.13.148.114 as permitted sender) identity=mailfrom; client-ip=62.13.148.114; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="dra-news@metastack.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@outmail148114.authsmtp.net) identity=helo; client-ip=62.13.148.114; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="dra-news@metastack.com"; x-sender="postmaster@outmail148114.authsmtp.net"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0AWAABezqhXmHKUDT5dgxiBA3wHpAsGiFiOJRyGAQKBQDwQAQEBAQEBAQERAQEBAQEICwsHGS+CMgQBEwGCEwEBBTo6BRACAQgYHhAhESUCBAENBQiIDwMYAwG+QQ2ELgEBAQEBBQEBAQEBAQEBAR6FYoFygyOCQ4F/gyqCLwEEmQU0jE+COwqPOYgtIYdeNYJCgVduhmB/AQEB X-IPAS-Result: A0AWAABezqhXmHKUDT5dgxiBA3wHpAsGiFiOJRyGAQKBQDwQAQEBAQEBAQERAQEBAQEICwsHGS+CMgQBEwGCEwEBBTo6BRACAQgYHhAhESUCBAENBQiIDwMYAwG+QQ2ELgEBAQEBBQEBAQEBAQEBAR6FYoFygyOCQ4F/gyqCLwEEmQU0jE+COwqPOYgtIYdeNYJCgVduhmB/AQEB X-IronPort-AV: E=Sophos;i="5.28,491,1464645600"; d="scan'208";a="187209082" Received: from outmail148114.authsmtp.net ([62.13.148.114]) by mail3-smtp-sop.national.inria.fr with ESMTP; 08 Aug 2016 20:30:08 +0200 Received: from mail-c232.authsmtp.com (mail-c232.authsmtp.com [62.13.128.232]) by punt20.authsmtp.com (8.14.2/8.14.2/) with ESMTP id u78IU65h084487; Mon, 8 Aug 2016 19:30:06 +0100 (BST) Received: from romulus.metastack.com (114.212-105-213.static.virginmediabusiness.co.uk [213.105.212.114]) (authenticated bits=0) by mail.authsmtp.com (8.14.2/8.14.2/) with ESMTP id u78IU5xR094437 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 8 Aug 2016 19:30:06 +0100 (BST) Received: from remus.metastack.local (remus.metastack.com [172.16.0.1]) by romulus.metastack.com (8.14.2/8.14.2) with ESMTP id u78IU4Ob018508; Mon, 8 Aug 2016 19:30:04 +0100 Received: from Remus.metastack.local ([fe80::547c:3c42:e1da:eda2]) by Remus.metastack.local ([fe80::547c:3c42:e1da:eda2%10]) with mapi id 14.03.0301.000; Mon, 8 Aug 2016 19:30:04 +0100 From: David Allsopp To: "moosotc@gmail.com" , Gabriel Scherer CC: caml users Thread-Topic: [Caml-list] Interface(.mli) location Thread-Index: AQHR8ZiIWCvy6CNG7kmmtpBMUxmENKA/YGNA Date: Mon, 8 Aug 2016 18:30:03 +0000 Message-ID: References: <8737mfp7j3.fsf@gmail.com> <87y447npv3.fsf@gmail.com> In-Reply-To: <87y447npv3.fsf@gmail.com> Accept-Language: en-GB, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.16.0.29] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Organization: MetaStack Solutions Ltd. X-Scanned-By: MIMEDefang 2.65 on 172.16.0.20 X-Server-Quench: 21213b84-5d96-11e6-829e-00151795d556 X-AuthReport-Spam: If SPAM / abuse - report it at: http://www.authsmtp.com/abuse X-AuthRoute: OCd1ZAARAlZZVg1f DC4bFwdFRBksPQFF ChxFJgxfNl8UURhQ KkJXbgESJgVMAnhE VHkJW1VSQFx4U2B1 YQpXIwdcYVRPXwB0 UklLXFNTEBpqBAMA SFsZWmAXck0keHd0 YUVlEHhdVUA0d0d/ Q00GHWkbYDNpbn0e URVeagtWeVZXfh9E b1F4XXZZZGABKBgV TUcAFDk0OXBbKT9J d0ksK04fW0gCFTN8 ARUGHHRnGUoOTjky KBpO X-Authentic-SMTP: 61633634383431.1037:706 X-AuthFastPath: 0 (Was 255) X-AuthSMTP-Origin: 213.105.212.114/25 X-AuthVirus-Status: No virus detected - but ensure you scan with your own anti-virus system. Subject: RE: [Caml-list] Interface(.mli) location moosotc@gmail.com wrote: > Gabriel Scherer writes: >=20 > > It is correct that ocamldep assumes that the .ml and .mli of a given > > module are at the same place, but this is not the case for the rest of > > the compilation chain, which is either concerned with single source > > files (a .ml file or a .mli file) or with "compilation units" (a .cmo > > and .cmi files passed together, independently of where their source > > files were). In particular, all type-checking tools do look in -I > > directories to find .cmi files for the dependencies of the module > > being compiled (and at this stage they do not care for .mli files). >=20 > But the script seems to (somewhat) contradict this, i.e. after `ocamlc -I > d -c a.ml' ocamlc ignores the presence of .mli inside subdirectory d/, > producing both .cmi/.cmo when when compiling a.ml. The -I option specifies extra directories for compiled files only, so it's = correct that the compiler ignores d/a.mli. Gerd is right that it's not so great that the compiler ignores d/a.cmi and = still generates the automatic a.cmi (though I'm not convinced it's an error= , personally). The automatic .cmi files are a pain in other areas (it's a n= uisance in build systems, as it makes parallelisation harder). I'd have pre= ferred to have something like ocamlc -ci a.ml being roughly equivalent to: $ ocamlc -i a.ml > a.mli $ ocamlc -c a.mli $ rm a.mli and the "gotcha" of forgetting to run ocamlc -ci a.ml being the first lesso= n in always producing .mli files, but it's a bit late for changes that :o) David=20