On Sun, Jul 04, 2010 at 12:04:32AM +0530, Martin DeMello wrote:
> Has much work been done on adding a scripting language to an OCaml
> program? I googled about a bit, but no one seems to be even talking
> about this - for example, if I wanted to do something emacslike with a
> core in OCaml and (ideally) some sort of scheme as a scripting engine
> in place of elisp, would that be easily doable?

You can embed a Perl interpreter and call out to Perl code using
perl4caml's Perl.eval function.  The API is even "type safe" in as
much as you can construct and examine the values going between the
Perl and the OCaml code, and detect errors at runtime (at compile time
too in some circumstances).

http://git.annexia.org/?p=perl4caml.git;a=blob;f=perl.mli;h=64d7904eb633bcc410f796d19e289bca49931bb5;hb=HEAD#l258

Your users might not thank you for this ...

Rich.

-- 
Richard Jones
Red Hat

_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Reply via email to