Browse thread
[Caml-list] scripting ocaml from inside of ocaml
-
Chris GauthierDickey
- Jean-Christophe Filliatre
- Yamagata Yoriyuki
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...> |
| Subject: | Re: [Caml-list] scripting ocaml from inside of ocaml |
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