Declaration header for portray/1, is this correct?

For portray/1 the clauses have basically the same declaration header. As I can not find other examples of a declaration header like these is this the correct declaration header for these clause headers?

%! portray(+Value):atom)/ is det.
portray(rules(List)) :-
portray([H|T]) :-
portray(comment_line(_,_)).
portray(rule(name(Name),elements(Elements))) :-
portray(name(Name)) :-

Complete code in rfc5234.pl

Shouldn’t that be

%! portray(@Value) is semidet.

portray/1 may fail, should accept any term and may not instantiate its argument (@). There is no terminating ‘/’, just ‘//’ to indicate we have a DCG non-terminal.

1 Like

Like I have any idea of what I am doing with PlDoc. As I occocaily note, one can not learn by sitting on the sidelines.

This is the first time I have made something using PlDoc public so need to make sure it is correct.

I suspect I will have more of these questions for the same piece of code, but want to take what I learn piece by piece and apply it then ask the next question when confused.