caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christian Lindig <lindig@gmail.com>
To: Martin DeMello <martindemello@gmail.com>
Cc: Gabriel Scherer <gabriel.scherer@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] building and using a library in a subdirectory
Date: Tue, 22 Sep 2015 21:22:27 +0200	[thread overview]
Message-ID: <C6869E89-566E-43A3-AB34-F57AE6F1AFAB@gmail.com> (raw)
In-Reply-To: <CAFrFfuGBrrwZb++1X962CAuvvE50tnx+b0BeA6PpspkQzVtOCQ@mail.gmail.com>


> On 22 Sep 2015, at 21:02, Martin DeMello <martindemello@gmail.com> wrote:
> 
> Okay, thanks, that does make sense. I'm curious now as to what the use case is for a .mllib file that just defines an internal library. It doesn't seem to be buying me anything if I don't want to compile the library separately and use it in a different project.

Like you have observed, libraries are good for distribution but are not useful within a project where you have all source files of that library available and where ocamlbuild makes sure, everything fits together.

(Conceptually, each source *.ml defines a top-level module and these modules all live in flat name space. Packaging them into libraries or distributing them over directories doesn’t introduce name spaces on the language level but might be still useful as a tool for organising source and object files.)

— C




  reply	other threads:[~2015-09-22 19:22 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-22  6:23 Martin DeMello
2015-09-22  6:45 ` Gabriel Scherer
2015-09-22  6:52   ` Martin DeMello
2015-09-22  6:58     ` Gabriel Scherer
2015-09-22  7:09       ` Martin DeMello
2015-09-22  7:45         ` Gabriel Scherer
2015-09-22 19:02           ` Martin DeMello
2015-09-22 19:22             ` Christian Lindig [this message]
2015-09-22  6:46 ` Martin DeMello

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=C6869E89-566E-43A3-AB34-F57AE6F1AFAB@gmail.com \
    --to=lindig@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@gmail.com \
    --cc=martindemello@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).