From: Alexey Rodriguez <mrchebas@gmail.com>
To: OCaml List <caml-list@inria.fr>
Subject: Generating comments from camlp4
Date: Fri, 11 Sep 2009 15:59:34 +0200 [thread overview]
Message-ID: <4b39c80a0909110659oc950714n809ad4f43cd56a62@mail.gmail.com> (raw)
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
next reply other threads:[~2009-09-11 14:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-11 13:59 Alexey Rodriguez [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b39c80a0909110659oc950714n809ad4f43cd56a62@mail.gmail.com \
--to=mrchebas@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox