caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Mark Bradley <barkmadley@gmail.com>
To: "Sébastien Hinderer" <Sebastien.Hinderer@inria.fr>, caml-list@inria.fr
Subject: Re: [Caml-list] How to include files dynamically
Date: Wed, 8 Jun 2016 14:16:49 +1000	[thread overview]
Message-ID: <CAFBPYtxTgrFAYp97vfwqqQR9KQbHJkmBfQ4h=_EBpxO-F65u4w@mail.gmail.com> (raw)
In-Reply-To: <20160607124853.GA2469@pl-59055.rocqadm.inria.fr>

[-- Attachment #1: Type: text/plain, Size: 1006 bytes --]

You can try ocaml_plugin (also uses dynlink but will compile the .ml file
before loading, I've also never tried it from the OCaml repl):

https://github.com/janestreet/ocaml_plugin

On 7 June 2016 at 22:48, Sébastien Hinderer <Sebastien.Hinderer@inria.fr>
wrote:

> Nicolas Ratier (2016/06/07 14:40 +0200):
> > Hello,
> >
> > Is there a way to include files dynamically ?
> > a kind of :
> >
> > let aaa = "myfile.ml";;
> > #use aaa;;
> >
> > Thanks,
>
> Have you looked at the dynlink module?
>
> As far as I know it can load only object files so you would have to
> compile your .ml file before. Not sure there is a better alternative.
>
> Sébastien.
>
> --
> 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
>



-- 
-barkmadley
sent from an internet enabled device
http://barkmadley.com

[-- Attachment #2: Type: text/html, Size: 2067 bytes --]

      reply	other threads:[~2016-06-08  4:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-07  2:59 [Caml-list] OASIS question: how does one set variables ? Chet Murthy
2016-06-07 12:40 ` [Caml-list] How to include files dynamically Nicolas Ratier
2016-06-07 12:48   ` Sébastien Hinderer
2016-06-08  4:16     ` Mark Bradley [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='CAFBPYtxTgrFAYp97vfwqqQR9KQbHJkmBfQ4h=_EBpxO-F65u4w@mail.gmail.com' \
    --to=barkmadley@gmail.com \
    --cc=Sebastien.Hinderer@inria.fr \
    --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).