janestreet / sexplib

Automated S-expression conversion
MIT License
147 stars 27 forks source link

Updating from Camlp4 to extension points #29

Closed scemama closed 7 years ago

scemama commented 7 years ago

Hi, I have plenty of code that uses sexplib, but I can't figure out how to modify it such that it works with ocaml > 4.03.

This is what I have done (using ocamlbuild):

But now I get an error:

Error: Unbound value t_of_sexp

And I don't know what to to next. I am completely stuck.

I was not able to find on the web a procedure to modify the code from the old way to the new way of using sexplib. I think it would be very useful if you could write all the steps in .md document in this repository.

Thanks in advance for your help.

Anthony

agarwal commented 7 years ago

You don't mention adding ppx_sexp_conv as a required package. Maybe that's the problem.

Also see https://github.com/janestreet/camlp4-to-ppx. This tool will convert all your source code automatically, but you still have to fix your build configuration.

scemama commented 7 years ago

You are right, ppx_sexp_conv is missing. Thanks for the link, I didn't find it when googling. This will solve my problems. Cheer, Anthony