Script to create a "restart" directive in toplevel
| 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.