You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ scryer-prolog -f discontiguous_dcg_error.pl
error(representation_error(dcg_body),[culprit-({true}->[])]).
% Warning: overwriting -->/2 because the clauses are discontiguous
The error is expected. The warning is unexpected, because the clauses are not discontiguous.
Low priority.
The text was updated successfully, but these errors were encountered:
I think the root cause is that throwing an exception during term expansion is treated as false by the loader.pl. So when exception is thrown then term is passed to compiler as-is, which then causes the warning. I don't know how to fix it correctly. One solution would be either to remove the offending term, so it wouldn't be compiled at all or change its principal functor to something different...
hurufu
added a commit
to hurufu/scryer-prolog
that referenced
this issue
Dec 5, 2024
Some DCG constructs aren't supported and can't be expanded, here we
remove offending DCG rule and don't compile it at all – in a similar
fashion to what we do when incorrect goal was found – whole predicate
isn't getting compiled.
Fixesmthom#2675
With
discontiguous_dcg_error.pl
comprising:I get:
The error is expected. The warning is unexpected, because the clauses are not discontiguous.
Low priority.
The text was updated successfully, but these errors were encountered: