caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gabriel Scherer <gabriel.scherer@gmail.com>
To: Francois Berenger <berenger@riken.jp>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] smarter #load directive
Date: Mon, 13 May 2013 08:21:31 +0200	[thread overview]
Message-ID: <CAPFanBGjSQRVZRxSCrmsbcxLT1xO4+Lw_i+ZvhJX2HWGf=CxAw@mail.gmail.com> (raw)
In-Reply-To: <51904E8A.9040603@riken.jp>

Following the caml-list discussion, and PR submission #5825 by
Grégoire Henry (with a patch!), the directive #mod_use "foo.ml" was
added in trunk last November.

It does not correspond to "load" because the module is not compiled
using ocamlc (no .cmo is produced), but compiled by the toplevel in
the current toplevel environment. The current implementation is a bit
hackish, I think, and in particular toplevel directives are not
allowed inside foo.ml -- I think they even are silently dropped. It
behaves exactly as if you entered "module Foo = <content of foo.ml
(minus toplevel directives)> end;;" directly in the toplevel.

On Mon, May 13, 2013 at 4:23 AM, Francois Berenger <berenger@riken.jp> wrote:
> On 05/13/2013 10:48 AM, Francois Berenger wrote:
>>
>> Hello,
>>
>> Was this integrated in the subversion trunk?
>>
>> I mean the
>> #load "toto.ml";;
>> that creates a Toto module automatically.
>
>
> Or was it '#use "toto.ml";;' ?
>
>
>> Thanks a lot,
>> F.
>>
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

  reply	other threads:[~2013-05-13  6:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13  1:48 Francois Berenger
2013-05-13  2:23 ` Francois Berenger
2013-05-13  6:21   ` Gabriel Scherer [this message]
2013-05-13 22:22     ` Gerd Stolpmann
2013-05-13 22:22     ` Gerd Stolpmann

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='CAPFanBGjSQRVZRxSCrmsbcxLT1xO4+Lw_i+ZvhJX2HWGf=CxAw@mail.gmail.com' \
    --to=gabriel.scherer@gmail.com \
    --cc=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    /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).