From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA08570; Tue, 1 Jul 2003 11:54:35 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA08342 for ; Tue, 1 Jul 2003 11:54:34 +0200 (MET DST) Received: from lri.lri.fr (lri.lri.fr [129.175.15.1]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h619sXj12283 for ; Tue, 1 Jul 2003 11:54:33 +0200 (MET DST) Received: from pc8-123 (pc8-123 [129.175.8.123]) by lri.lri.fr (8.11.6p2/jtpda-5.3.2) with ESMTP id h619lxt08223 ; Tue, 1 Jul 2003 11:47:59 +0200 (MEST) Received: from filliatr by pc8-123 with local (Exim 3.35 #1 (Debian)) id 19XHjz-0000FK-00; Tue, 01 Jul 2003 11:47:59 +0200 From: Jean-Christophe Filliatre MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <16129.22735.42503.470810@gargle.gargle.HOWL> Date: Tue, 1 Jul 2003 11:47:59 +0200 To: "Chris GauthierDickey" Cc: Subject: Re: [Caml-list] scripting ocaml from inside of ocaml In-Reply-To: <001001c33ccc$5e878300$a806df80@chrisgd> References: <001001c33ccc$5e878300$a806df80@chrisgd> X-Mailer: VM 7.03 under Emacs 20.7.2 Reply-To: Jean-Christophe.Filliatre@lri.fr (Jean-Christophe Filliatre) X-MailScanner: Found to be clean X-Spam: no; 0.00; filliatre:01 lri:01 caml-list:01 ocamlmktop:01 topdirs:01 filliatr:01 chris:01 bindings:01 ocaml:01 bytecode:01 toplevel:01 writes:01 objects:02 scripting:05 i'd:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Chris GauthierDickey writes: > > I've searched the FAQs, manuals, and mailing lists to no avail. I have an > application that I'm writing in ocaml, and I need to do some scripting for > the program. I'd like to use ocaml as the scripting language. I've seen > references to using ocaml to interpret scripts from files, etc, but these > all assume that your environment is closed to the scripting. In particular, > I would like to be able to use ocaml to interpret scripts, have scripts > refer to objects that I import into their environment, and be able to take > values from their bindings in the scripts environment and use them in my > ocaml code. There may be another solution to your problem if you are fine with running bytecode only: you can build your program on top of an ocaml toplevel (with ocamlmktop) and then use Topdirs.dir_use (the function which realizes #use in the toplevel) to interpret your ocaml scripts. Hope this helps, -- Jean-Christophe Filliātre (http://www.lri.fr/~filliatr) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners