On 23/02/14 13:12, Tianyi Cui wrote:Hm, imagine that the expected type is:
> If you know the type of this string in advance, you can do so with ocaml_plugin: https://github.com/janestreet/ocaml_plugin
'a * 'a -> bool
Now, if user provides a string, say:
"fun (a,b) -> a = b"
how can I convert that string to Ocaml value of the above type (like how toplevel does it)?
Is this something ocaml_plugin is able to do for me? I've failed to figure out the trick.
--
Caml-list mailing list. Subscription management and archives:
https://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs