caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamldoc changes the names of polymorphic types
@ 2011-06-16 16:02 vincent.monfort
  2011-06-16 16:27 ` Gabriel Scherer
  0 siblings, 1 reply; 2+ messages in thread
From: vincent.monfort @ 2011-06-16 16:02 UTC (permalink / raw)
  To: caml-list

Hi everyone,
I used particular names for some polymorphic types in my .mli files but these
names were replaced with default names by ocamldoc in the documentation.
E.g.:
.mli:
type ('dom,'tf) manager = {
  bot : 'dom; 
  ...
}

.html:
type ('a, 'b) manager = {
	bot : 'a;
	...
}

Is there any way to force ocamldoc to keep the names given in the documentation
?
If it is not the case I think it would be a good thing because it could make
the documentation more readable.

Regards,

Vincent 

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

* Re: [Caml-list] ocamldoc changes the names of polymorphic types
  2011-06-16 16:02 [Caml-list] ocamldoc changes the names of polymorphic types vincent.monfort
@ 2011-06-16 16:27 ` Gabriel Scherer
  0 siblings, 0 replies; 2+ messages in thread
From: Gabriel Scherer @ 2011-06-16 16:27 UTC (permalink / raw)
  To: vincent.monfort; +Cc: caml-list

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

I don't think there is such an option.

This is related, but not exactly the same as, this bugtracker entry:
  http://caml.inria.fr/mantis/view.php?id=5067

From what I remember when posting the entry, ocamldoc has at its disposition
both the parsed AST from the source, and the typedtree representation (the
program representation after type inference). It uses the typedtree
representation to display types, so I suppose the type variable name
information is lost. You may change the output -- ocamldoc is rather modular
and you can add plugins to change the output -- to use the parsed AST
instead, which has the name information, but at the time I didn't find a way
to do that easily without losing the nice syntax highlighting and
cross-referencing performed by ocamldoc on the type.

On Thu, Jun 16, 2011 at 6:02 PM, <vincent.monfort@inria.fr> wrote:

> Hi everyone,
> I used particular names for some polymorphic types in my .mli files but
> these
> names were replaced with default names by ocamldoc in the documentation.
> E.g.:
> .mli:
> type ('dom,'tf) manager = {
>  bot : 'dom;
>  ...
> }
>
> .html:
> type ('a, 'b) manager = {
>        bot : 'a;
>        ...
> }
>
> Is there any way to force ocamldoc to keep the names given in the
> documentation
> ?
> If it is not the case I think it would be a good thing because it could
> make
> the documentation more readable.
>
> Regards,
>
> Vincent
>
> --
> 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
>
>

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

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

end of thread, other threads:[~2011-06-16 16:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-16 16:02 [Caml-list] ocamldoc changes the names of polymorphic types vincent.monfort
2011-06-16 16:27 ` Gabriel Scherer

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