Script to create a "restart" directive in toplevel

"[email protected] [ocaml_beginners]" <[email protected]>
Newsgroups gmane.comp.lang.ocaml.beginners
Message-ID <[email protected]>
When I build projects with ocaml I use the toplevel a lot,
and it would make my life much easier if I had a way to compile
the following sequence of commands in a unique 
unit->unit function (say ):

#quit;; (* leave current toplevel *)
make (* recompile *)
./ocaml (* enter newly compiled toplevel *)


I have incomplete ideas about how to achieve this. For the
middle command I obviously can use Sys.command "make";;,
and I think I must somehow change the order of the commands
(the old toplevel executable must somehow "leave a message"
indicating to launch the new toplevel before self-destructing).

Any help appreciated.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.