Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[Caml-list] Sexplib bug report

6 views
Skip to first unread message

bob zhang

unread,
Feb 16, 2012, 8:56:18 PM2/16/12
to Caml List
Hi, I did not find sexplib mailing list, so I posted it here.
sexplib is not compatible with camlp4of

For example
camlp4of Pa_type_conv.cma pa_sexp_conv.cma -str "type ('a,'b) delta =
('b * 'a) "
broken
camlp4o Pa_type_conv.cma pa_sexp_conv.cma -str "type ('a,'b) delta =
('b * 'a) "
good
camlp4of Pa_type_conv.cma pa_sexp_conv.cma -str "type ('a,'b) delta =
('b * 'a) with sexp "
good
camlp4o Pa_type_conv.cma pa_sexp_conv.cma -str "type ('a,'b) delta =
('b * 'a) with sexp "
good

Is it possible to separate the syntax extension from the code
generation part? syntax extension is always  fragile, code generation
API is still pretty useful. In my opinion, the main meat lies in code
generation part.

<:sexp< type t = bla bla >> maybe more robust, but it requires
camlp4of as the basic preprocessor instead of camlp4o

--
Best, bob


--
Caml-list mailing list. Subscription management and archives:
https://sympa-roc.inria.fr/wws/info/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

Markus Mottl

unread,
Feb 17, 2012, 12:35:24 AM2/17/12
to bob zhang, Caml List
On Thu, Feb 16, 2012 at 20:55, bob zhang <bobzha...@gmail.com> wrote:

> Is it possible to separate the syntax extension from the code
> generation part? syntax extension is always fragile, code generation
> API is still pretty useful. In my opinion, the main meat lies in code
> generation part.
>

Not sure, but even if, I guess it would not be easy.


> <:sexp< type t = bla bla >> maybe more robust, but it requires
> camlp4of as the basic preprocessor instead of camlp4o


If there were only one preprocessor (sexplib) this would work, but having
more than one (e.g. also bin-prot) does not seem straightforward. It's not
clear how multiple and independently developed code generators can be
composed, especially safely without interfering with each other.

Regards,
Markus

--
Markus Mottl http://www.ocaml.info markus...@gmail.com
0 new messages