scryer-prolog
scryer-prolog copied to clipboard
incorrect line number in warning
In contrast to errors, warnings print line numbers starting from 0 and appear to correspond to the line of the clause head rather than a more specific line inside the body.
foo(X).
foo(1) :-
true,
true,
true,
Y.
$ scryer-prolog foo.pl
Warning: singleton variables X at line 0 of foo.pl
Warning: singleton variables Y at line 1 of foo.pl
Related to #302 What you can only expect (with reasonable effort) is the precise area of the complete clause. Everything else would imply a lot of extra work.