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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id E299C7F72A for ; Wed, 10 Aug 2016 12:39:00 +0200 (CEST) IronPort-PHdr: 9a23:ZtXmjxeYzGAUX8SP1zBiznyHlGMj4u6mDksu8pMizoh2WeGdxc69bR7h7PlgxGXEQZ/co6odzbGH6ua4BSdYu97B6ClEK80UEUddyI0/pE8JOIa9E0r1LfrnPWQRPf9pcxtbxUy9KlVfA83kZlff8TWY5D8WHQjjZ0IufrymUrDbg8n/7e2u4ZqbO1wO32vkJ+suZ03s5UWJ749N0NMkcv5wgjLy4VJwM9xMwm1pIV/B1z3d3eyXuKBZziJLpvg6/NRBW6ipN44xTLhfESh0ezttvJ6jnVD5QACO/noRVHkN2loNWlCdrUKyYpCkniLkt+Y18S2eJsruVfhgVS6rqqFmVwTAjSobPiUl+WrUzMd3ifQIjgimokl6xInPZ52eHPV7d6LZO9gdQDkSFv1NXjBMV9vvJ7AECPAMaKMB99Hw Authentication-Results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=moosotc@gmail.com; spf=Pass smtp.mailfrom=moosotc@gmail.com; spf=None smtp.helo=postmaster@mail-wm0-f46.google.com Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of moosotc@gmail.com) identity=pra; client-ip=74.125.82.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="moosotc@gmail.com"; x-sender="moosotc@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of moosotc@gmail.com designates 74.125.82.46 as permitted sender) identity=mailfrom; client-ip=74.125.82.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="moosotc@gmail.com"; x-sender="moosotc@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-wm0-f46.google.com) identity=helo; client-ip=74.125.82.46; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="moosotc@gmail.com"; x-sender="postmaster@mail-wm0-f46.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0CpAAAzA6tXhi5SfUpdhBt8uyMchgECgVs8EAEBAQEBAQEBEQEBAQgLCwkZL4IyBAETAYITAQEEAQERLgEbHQEDAQsGBQsDCgkeBw8BBA0CEQEFAQsXExoBB4d0AQMPCASjQYEyPjKNJYJbBYZVChknDVSDXgEBAQEBAQEDAQEBAQEBGQIGEIQPhliCQ4dYBY8KiX40hh2GOYI8iUeFfIgthj8xgQ81gjERC4FPa4csAQEB X-IPAS-Result: A0CpAAAzA6tXhi5SfUpdhBt8uyMchgECgVs8EAEBAQEBAQEBEQEBAQgLCwkZL4IyBAETAYITAQEEAQERLgEbHQEDAQsGBQsDCgkeBw8BBA0CEQEFAQsXExoBB4d0AQMPCASjQYEyPjKNJYJbBYZVChknDVSDXgEBAQEBAQEDAQEBAQEBGQIGEIQPhliCQ4dYBY8KiX40hh2GOYI8iUeFfIgthj8xgQ81gjERC4FPa4csAQEB X-IronPort-AV: E=Sophos;i="5.28,499,1464645600"; d="scan'208";a="229519925" Received: from mail-wm0-f46.google.com ([74.125.82.46]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 10 Aug 2016 12:39:00 +0200 Received: by mail-wm0-f46.google.com with SMTP id i5so94367948wmg.0 for ; Wed, 10 Aug 2016 03:39:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=+PjLs3CASgmOiPrYo47PnCiIHv/IlCxCwQvJBFvcqm0=; b=wvwIwkSULKP/ZXCR4g7a6BX3ZMiIq+VnBTNsozAJFk0VM3l/SFDmJ0RBs5dfenrBOt uImHggFhN+X2UTzbvZhxrqGBY2C9MZueGhrYpMRFPMeLmdYH0+tFdVc4y7IHVbu2ROGa uEXi72ZoNG+Wglh6ZmJz/SP4B7ftWH9+pf0TwMMcojzoDDntLQJSUBAJBaLcRrNyhn30 5ORC07wyIjF/dumPqrso1jhq/Oodz1yFd1A8DaCeSeF8RZh70EjDv6+ZbPdVyRGKpIXD CPoO7J81t2e9uCO/flLP193sfUxW2yw6pdjTPke5Y6BlKceGBtGivZPnvA1xeVnFX9Dx VNrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=+PjLs3CASgmOiPrYo47PnCiIHv/IlCxCwQvJBFvcqm0=; b=R89Y1zkNkqWCU14nTdHtg+mSd8+Qnp5NVzs9MpmVgsNQg9eXJfFj7gHPRMx3Tdajhk TUMAgoE5EYZ5tMhnFxUrsL+VkI1vXr1tJAeWXCaZxK/21bhuBbJJIsyX75Ia+esrhQXC JVvr1PBUDat2mbLtxGHMBaBjQHpPOBNCC4lIiWupXWvyGx2Ll6n+soi6KHSMFSsK6L5+ ipftkQhNEu33KjGGhFP98sC4Msqb9NAAAAtJsa/0OD2KzAWKdTaU+9Y8JyoyobVNfnSN lMpwnEXGZKaXFllG2anzltl77PbfgLYPvy4GVTldCwiYm2xaAgWrf5EdmeXI/I2ml+ZJ /AwA== X-Gm-Message-State: AEkoouvIgkKfAs4wuQqX6H3mRwAbF5FES3cKFbh1CSmYa3skeqh4l5jN6I8K2ljB1Utckg== X-Received: by 10.46.33.151 with SMTP id h23mr537742lji.38.1470825539708; Wed, 10 Aug 2016 03:38:59 -0700 (PDT) Received: from linmac2 ([188.123.252.212]) by smtp.gmail.com with ESMTPSA id k15sm7420923lfb.25.2016.08.10.03.38.58 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 10 Aug 2016 03:38:59 -0700 (PDT) From: moosotc@gmail.com To: David Allsopp Cc: Gabriel Scherer , caml users References: <8737mfp7j3.fsf@gmail.com> <87y447npv3.fsf@gmail.com> <87r39znl6m.fsf@gmail.com> <87mvknnia0.fsf@gmail.com> <87k2fqcirv.fsf@gmail.com> <87d1licgmw.fsf@gmail.com> <878tw6cgh2.fsf@gmail.com> <87vaz9bxjq.fsf@gmail.com> <87k2fpbtud.fsf@gmail.com> Date: Wed, 10 Aug 2016 13:38:58 +0300 In-Reply-To: (David Allsopp's message of "Wed, 10 Aug 2016 08:20:16 +0000") Message-ID: <87zioksybh.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Caml-list] Interface(.mli) location David Allsopp writes: > moosotc@gmail.com wrote: >> David Allsopp writes: [..snip..] >> >> srctree/var1/mod.{ml,mli} >> srctree/var2/mod.{ml,mli} >> >> instead of potential >> >> srctree/mod.mli srctree/var1/mod.ml srctree/var2/mod.ml > > Yes, I get that - this is starting to feel mutually recursive. As it > concerns you hugely, looking again at your original message: > > a) Yes, the compiler does expect the .ml and .mli files to be in the same directory > b) Yes, this behaviour is specified in the manual, possibly too > mathematically for your tastes, and perhaps benefitting from a > cross-reference/extra sentence in section 2.5 to the compiler driver's > documentation. > c) No, the compiler does not force you to put .mli files with the .ml > files in your use case - it has existing tools which can just about > facilitate the layout you're after (see below). They could be > improved, though. > d) Lifting the "restriction", for example by allowing -I to search for > .mli files, poses a large backwards-compatibility risk. > > Of the options I'd already specified, were any of: > > a) Add a new command line parameter to make ocamlc/ocamlopt pretend > that it found a .mli file with the .ml file (and so use the -I > directories to find the .cmi) That'd work. > b) Abuse the -intf-suffix parameter to achieve the same effect as option a Sorry, haven't tried that. > c) Put a dummy/empty .mli (not the actual one) in each directory to > achieve the same thing > This does work. Thanks. > fundamentally unsuitable? You did eliminate the fourth option, which > was just to delete the auto-generated .cmi file as with -o you can > make it overwrite the actual .cmi file. I'm still puzzled as to why > none of those other options yields a solution and the only way to you > is a breaking change to the compiler driver or very pedantic updates > to the documentation? > c. Which does work is not "fundamentally unsuitable" it's just: a) not aesthetic b) wastes an inode/repository entry -- mailto:moosotc@gmail.com