caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Gerd Stolpmann" <info@gerd-stolpmann.de>
To: "Gabriel Scherer" <gabriel.scherer@gmail.com>
Cc: "Francois Berenger" <berenger@riken.jp>, caml-list@inria.fr
Subject: Re: [Caml-list] smarter #load directive
Date: Tue, 14 May 2013 00:22:24 +0200	[thread overview]
Message-ID: <c7039036495d445384525f5a42dc370a.squirrel@gps.dynxs.de> (raw)
In-Reply-To: <CAPFanBGjSQRVZRxSCrmsbcxLT1xO4+Lw_i+ZvhJX2HWGf=CxAw@mail.gmail.com>


> 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.

So far I remember, this is the intended meaning. Directives do not make
sense inside modules. If they are not rejected, I'd consider this as an
error, though.

Gerd

> 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
>
> --
> 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
>


-- 
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details:        http://www.camlcity.org/contact.html


      parent reply	other threads:[~2013-05-13 22: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
2013-05-13 22:22     ` Gerd Stolpmann
2013-05-13 22:22     ` Gerd Stolpmann [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=c7039036495d445384525f5a42dc370a.squirrel@gps.dynxs.de \
    --to=info@gerd-stolpmann.de \
    --cc=berenger@riken.jp \
    --cc=caml-list@inria.fr \
    --cc=gabriel.scherer@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).