caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Generating comments from camlp4
@ 2009-09-11 13:59 Alexey Rodriguez
  2009-09-15 12:26 ` Alexey Rodriguez
  0 siblings, 1 reply; 7+ messages in thread
From: Alexey Rodriguez @ 2009-09-11 13:59 UTC (permalink / raw)
  To: OCaml List

Dear list,

Is there a way to generate comments from camlp4 code?

We have preprocessors that generate the following kind of code in signatures:

>  <:sig_item<
>    $sig_generator the_type_declaration$;
>  >>

However, these extra function signatures show up in the output of
ocamldoc which is very annoying. We thought of using "ocamldoc stop"
tags (** / **), but we do not know how to generate such comments from
camlp4. Do you know of a way to do this:

>  <:sig_item<
>    (** / **)
>    $sig_generator the_type_declaration$;
>    (** / **)
>  >>

Comments are not part of the AST so I suppose we have to do some
hacking at the lexing level.

Note that having a dummy preprocessor that generates empty signatures
is not an option: this causes type checking errors that require a lot
of effort to circumvent.

Cheers,

Alexey


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

end of thread, other threads:[~2009-09-16  8:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-11 13:59 Generating comments from camlp4 Alexey Rodriguez
2009-09-15 12:26 ` Alexey Rodriguez
2009-09-15 12:42   ` [Caml-list] " Anil Madhavapeddy
2009-09-16  1:03     ` Jake Donham
2009-09-16  7:48       ` Alexey Rodriguez
2009-09-16  8:02         ` Tiphaine Turpin
2009-09-15 12:44   ` Tiphaine Turpin

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).