caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: David Allsopp <dra-news@metastack.com>
To: SF Markus Elfring <elfring@users.sourceforge.net>
Cc: "moosotc@gmail.com" <moosotc@gmail.com>,
	Gabriel Scherer <gabriel.scherer@gmail.com>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: RE: [Caml-list] Interface(.mli) location
Date: Tue, 9 Aug 2016 18:26:57 +0000	[thread overview]
Message-ID: <E51C5B015DBD1348A1D85763337FB6D9013504DE14@Remus.metastack.local> (raw)
In-Reply-To: <d906de84-c688-d2a0-2f4b-3204169ac8cd@users.sourceforge.net>

SF Markus Elfring wrote:
> >>> a) Delete ./a.cmi as part of your build procedure.
> >>
> >> Can this design option trigger difficulties in your file system
> >> configuration?
> >
> > What sort of difficulties do you mean?
> 
> Do software build systems track the existence of such a generated file?
>
> Are you also concerned about a harder parallelisation there?
>
> > d/a.cmi may constrain values defined in ./a.ml and you won't get the
> > type-checking this way.
> 
> I would usually expect that these interface descriptions should be kept
> consistent to some degree.

Well yes, except that the compiler has two ways of interpreting an .ml file. Consistency would be maintained in either scenario - when there's a .ml and a .mli, the compiler will ensure that the interface of the Foo.ml and Foo.cmi unify, and you'll get a type error if they don't. Alternatively, if you don't have Foo.mli (so Foo.cmi and Foo.cmo are both generated) and you later try to link Foo.cmo with a module which expected it to comply with a different .cmi interface, you will get an "inconsistent assumptions about module Foo" link error (which admittedly would be very confusing, as that usually implies you have stale object files somewhere, not a broken build system). 

> > I was just floating ideas - if it's actually useful, raise a Mantis PR!
> 
> Will another official bug report or feature request help to improve the
> discussed situation?

It's just the next step if a change wants to made (or alternately coding up a suggestion and making a pull request on GitHub). I can certainly see that something along the lines of the -no-cmi option I suggest could be a useful addition, and it's in keeping with options like -impl, -intf and -intf-suffix, for example. But I'm just an observer :o)


David


      reply	other threads:[~2016-08-09 18:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-08 16:09 moosotc
2016-08-08 17:03 ` Gabriel Scherer
2016-08-08 17:12   ` Gerd Stolpmann
2016-08-08 17:16   ` moosotc
2016-08-08 18:30     ` David Allsopp
2016-08-08 18:57       ` moosotc
2016-08-08 19:39         ` David Allsopp
2016-08-08 19:59           ` moosotc
2016-08-08 22:54             ` David Allsopp
2016-08-09  8:45               ` SF Markus Elfring
2016-08-09 16:26                 ` David Allsopp
2016-08-09 17:55                   ` SF Markus Elfring
2016-08-09 10:56               ` moosotc
2016-08-09 11:43                 ` moosotc
2016-08-09 11:46                   ` moosotc
2016-08-09 18:08                     ` David Allsopp
2016-08-09 18:35                       ` moosotc
2016-08-09 18:59                         ` David Allsopp
2016-08-09 19:55                           ` moosotc
2016-08-10  8:20                             ` David Allsopp
2016-08-10 10:38                               ` moosotc
2016-08-09 18:33             ` David Allsopp
2016-08-09 18:38               ` moosotc
2016-08-09 19:02                 ` David Allsopp
2016-08-09  9:22           ` SF Markus Elfring
2016-08-09 16:32             ` David Allsopp
2016-08-09 18:10               ` SF Markus Elfring
2016-08-09 18:26                 ` David Allsopp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E51C5B015DBD1348A1D85763337FB6D9013504DE14@Remus.metastack.local \
    --to=dra-news@metastack.com \
    --cc=caml-list@inria.fr \
    --cc=elfring@users.sourceforge.net \
    --cc=gabriel.scherer@gmail.com \
    --cc=moosotc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).