From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id 45F877FD92 for ; Wed, 8 Jun 2016 06:17:11 +0200 (CEST) IronPort-PHdr: 9a23:pSFpjBwVF4b5jgnXCy+O+j09IxM/srCxBDY+r6Qd0OgeIJqq85mqBkHD//Il1AaPBtWKra0ewLWP+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuSt+U0J78iLn60qaQSjsLrQL1Wal1IhSyoFeZnegtqqwmFJwMzADUqGBDYeVcyDAgD1uSmxHh+pX4p8Y7oGx48sgs/M9YUKj8Y79wDfkBVGxnYFYO+dbzuBLfYQyK73oaGiVKw1sbSzTCuSp7VJ7qrir3sN1d2S+WMNf7V/hgYjmo5rx3SRLuzgcGMTI06mzNos12lqNS5hy78Vg3yIfRZMSRNeFiVqLbZ9ITA2RbDehLUCkUJ4qmbMMlFeMNOetJ5933rkENqBKyAQS9LOzqwz5MwHTx2PtpgKwaDQja0Vl4TJo1u3POoYCwaf4f Authentication-Results: mail3-smtp-sop.national.inria.fr; spf=None smtp.pra=barkmadley@gmail.com; spf=Pass smtp.mailfrom=barkmadley@gmail.com; spf=None smtp.helo=postmaster@mail-vk0-f47.google.com Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of barkmadley@gmail.com) identity=pra; client-ip=209.85.213.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="barkmadley@gmail.com"; x-sender="barkmadley@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of barkmadley@gmail.com designates 209.85.213.47 as permitted sender) identity=mailfrom; client-ip=209.85.213.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="barkmadley@gmail.com"; x-sender="barkmadley@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-vk0-f47.google.com) identity=helo; client-ip=209.85.213.47; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="barkmadley@gmail.com"; x-sender="postmaster@mail-vk0-f47.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0BhEQDLm1dXfS/VVdFdg1w4fQamMwcBAQEGgQ+CIiqFRYYjhngihXECgT0HPBABAQEBAQEBAREBAQkLCwkhL0EBAQMJAoFfghYBAQMBEhEdARsSDAMBCwYFBAcaHQICIgERAQUBChIGARISEIdyAQMPCA6eGoExPjGLO4FqglgFiAcKGScDClKDLwEBAQEGAQEBAQEBARgCBhCFT4UVhG2CVII9HAWGQwyRfIYDiCOCN4xojiASHoEPDyaCGYIGKjKFEIJMgjMBAQE X-IPAS-Result: A0BhEQDLm1dXfS/VVdFdg1w4fQamMwcBAQEGgQ+CIiqFRYYjhngihXECgT0HPBABAQEBAQEBAREBAQkLCwkhL0EBAQMJAoFfghYBAQMBEhEdARsSDAMBCwYFBAcaHQICIgERAQUBChIGARISEIdyAQMPCA6eGoExPjGLO4FqglgFiAcKGScDClKDLwEBAQEGAQEBAQEBARgCBhCFT4UVhG2CVII9HAWGQwyRfIYDiCOCN4xojiASHoEPDyaCGYIGKjKFEIJMgjMBAQE X-IronPort-AV: E=Sophos;i="5.26,437,1459807200"; d="scan'208,217";a="180529863" Received: from mail-vk0-f47.google.com ([209.85.213.47]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/AES128-GCM-SHA256; 08 Jun 2016 06:17:10 +0200 Received: by mail-vk0-f47.google.com with SMTP id d64so147395447vkb.0; Tue, 07 Jun 2016 21:17:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=g0GninPH6gDImYG9Qdi1+fHyupdACfOS6EJK6LAUN+E=; b=I9pj6T42Z9JlNnHeq+fEM+vlRkr7Elm1XIy8NrbfR8ePcrmIsrE7Y45dxltydHNwOE jxcnaCkNhowhJU0uk7hwTEigm2JvnZ+SwxaKEq+BMJj8iK2FsfhICk18mEREMdNwQDLM 2aZ0ecQYeKtDb67RWRa2uTfi6iHbHeepjMQiKSsE3iIyLVcvRbulXd/Kstv2HwPK8sAK 2KTwyigNkv6jyj5lpOhh9FOiEHRkNEooMgdjIBSIl7vQN0k02HUzB3NraRPL7Ga1CxP+ sySfdp0c7mzlL6HPFcweGI0iMcJDAVXmxhR628C65vtvY1/R2tz8qhG/Q34DiEcoecsS NyPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=g0GninPH6gDImYG9Qdi1+fHyupdACfOS6EJK6LAUN+E=; b=LAqJF7HdWmlFuxfRQ95QbrUohXcmBqtZnu0ad3nURIqvsvwhihALI5CRm+ZRlFVu6P jzpvv4n8tLfI88Ydt679z0Opi9cqFeUkpPI1GhwpncRVkuSdljClNxTZxzj0dEPPZqhU 01sQGe5fIcKp84VW100d2sTpbEFzKDEJrzJrGCyE6KelZHC4Lhy6o9Q1L+deX7j19gDo v9PN3EFI2ZOCa8puZFnQclX6ekUxWKpmz7XU4ZgDGmSBFcycIDs50o8PV+AcRja0VK/s HvpRq3rc0CPp9Ti3NObhvX66Rqx+zm/FS9Omzz33Jf0fixjEQAtpE6LAf+sq7jYwM7Sx 65vw== X-Gm-Message-State: ALyK8tKid3KteJPHjTYXs/5QPKJlEklqP2B3VUm2oYfrAthTMusclpFkIWC2VCcFR9xD8QS3Brk6ysLfg468wA== X-Received: by 10.31.74.2 with SMTP id x2mr1059685vka.99.1465359428570; Tue, 07 Jun 2016 21:17:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.176.69.7 with HTTP; Tue, 7 Jun 2016 21:16:49 -0700 (PDT) In-Reply-To: <20160607124853.GA2469@pl-59055.rocqadm.inria.fr> References: <5756C0C2.8010201@femto-st.fr> <20160607124853.GA2469@pl-59055.rocqadm.inria.fr> From: Mark Bradley Date: Wed, 8 Jun 2016 14:16:49 +1000 Message-ID: To: =?UTF-8?Q?S=C3=A9bastien_Hinderer?= , caml-list@inria.fr Content-Type: multipart/alternative; boundary=001a114da2763553660534bc942f Subject: Re: [Caml-list] How to include files dynamically --001a114da2763553660534bc942f Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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=C3=A9bastien Hinderer wrote: > Nicolas Ratier (2016/06/07 14:40 +0200): > > Hello, > > > > Is there a way to include files dynamically ? > > a kind of : > > > > let aaa =3D "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=C3=A9bastien. > > -- > 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 > --=20 -barkmadley sent from an internet enabled device http://barkmadley.com --001a114da2763553660534bc942f Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
You can try ocaml_plugin (also uses dynlink but will compi= le the .ml file before loading, I've also never tried it from the OCaml= repl):

On 7 June 2016 at 22:48, S=C3= =A9bastien 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 =3D "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=C3=A9bastien.

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocam= l_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs



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