From bf64c841561b7425468fefa2258a1d265f81cbb3 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 28 Nov 2023 21:35:02 +0100 Subject: [PATCH] ; Fix error with documentation at point for nullary compounds --- sweep.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sweep.pl b/sweep.pl index cb99ee6..47a2a97 100644 --- a/sweep.pl +++ b/sweep.pl @@ -426,11 +426,14 @@ explicit_args(N, G0, G) :- !, explicit_args_(N, G0, G). +explicit_args_(0, G, G) :- + atom(G), + !. explicit_args_(N, G0, G) :- - G0 =.. [F|A0], + compound_name_arguments(G0, F, A0), length(A1, N), append(A0, A1, A), - G =.. [F|A]. + compound_name_arguments(G, F, A). sweep_short_documentation_finalize(M, PI, Index, PIString, Doc, ArgSpan) :- doc_comment(M:PI, Pos, OneLiner, Comment), -- 2.39.5