[mercury-users] XMLer in mmc not picking up first type comment?

Peter Ross pro at missioncriticalit.com
Tue Apr 24 12:58:00 AEST 2007


On 4/21/07, doug.auclair at logicaltypes.com <doug.auclair at logicaltypes.com> wrote:
> It seems that the XML representation tools may not be picking up the
> first comment of the first type declared in the interface section, but
> it does pick up comments for the types/preds/funcs after that.
>
> An example of this is graph.m: the XML document does not have the
> comment for the graph/2 type (which is the first declaration after
> the interface declaration), but it does have the comments for the
> other types and preds.
>
Is this not because the first type is an abstract type, which as you
noted below?

> Another issue is that if a type is divided into an abstract type in
> the interface and an implementation type (in the case I saw, for a
> discriminated union type definition), if the comment explaining the
> type is attached to the abstract interface (as it should be for
> good documentation purposes) and not by the implementation type, then
> the XML representation drops the comment entirely.  I've found a
> work-around to this problem is to attach a verbatim, redundant,
> comment to the implementation type; this puts the comment into the XML.
>
> Would you please, however, modify the XML generator so that is does
> include the comment of the abstract type to the type XML and also see
> if there's a fix to include the comments attached to the first
> declared type?
>
Yes there is a problem with this, because by the time the comment
generator runs we only have the line numbers for the definition, we
don't have the line numbers for the abstract declaration.
Unfortunately this is not trivial to fix, as the information is
discarded and at the moment I don't have time to fix this, so I can't
guarantee that it will occur anytime soon.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list