I\'m trying to \"eval\" a string representing an OCaml expression in OCaml. I\'m looking to do something equivalent to Python\'s eval.
So far I\'ve not been able to find
OCaml is a compiled (not interpreted) language. So there's no simple way to do this. Certainly there are no language features that support it (as there are in almost every interpreted language). About the best you could do would be to link your program against the OCaml toplevel (which is an OCaml interpreter).