caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Sexplib bug report
@ 2012-02-17  1:55 bob zhang
  2012-02-17  5:34 ` Markus Mottl
  0 siblings, 1 reply; 2+ messages in thread
From: bob zhang @ 2012-02-17  1:55 UTC (permalink / raw)
  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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] Sexplib bug report
  2012-02-17  1:55 [Caml-list] Sexplib bug report bob zhang
@ 2012-02-17  5:34 ` Markus Mottl
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Mottl @ 2012-02-17  5:34 UTC (permalink / raw)
  To: bob zhang; +Cc: Caml List

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On Thu, Feb 16, 2012 at 20:55, bob zhang <bobzhang1988@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.mottl@gmail.com

[-- Attachment #2: Type: text/html, Size: 1424 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-02-17  5:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-17  1:55 [Caml-list] Sexplib bug report bob zhang
2012-02-17  5:34 ` Markus Mottl

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).