Question

I'm about to write an abstract syntax for OCaml in scala, in combination with a pretty printer. After that I want execute the generated OCaml code from scala and work with the result.

Is there a way to do that, without running a external OCaml compiler, execute the program and reading the result from stdout?

Was it helpful?

Solution

If you want to call external processes from Scala, take a look on the built-in processes DSL. It's pretty nice.

You can also fall back to the simple Java solutions (i.e., ProcessBuilder or Runtime.exec()).

OTHER TIPS

Preview version of OCaml-Java is available. http://ocamljava.x9c.fr/preview/#scripting

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top