-
Notifications
You must be signed in to change notification settings - Fork 122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(+\)/2 in call/1 confused predicate calls #2255
Comments
Also, this works for some reason:
|
$ scryer-prolog ?- Goal = (X +\ user:p), write_canonical(Goal), nl. |
That doesn't seem to be the problem: ?- Goal = (X +\ (user:p)), write_canonical(Goal), nl, call(Goal).
+\(_43,:(user,p))
Goal = X+\(user:p). |
Works in SICStus. If at it, the existence error produced by Scryer does not reveal the actual module where the error occurs, which makes diagnosing difficult. |
I think this is still not fixed fully: ?- use_module(library(lambda)).
true.
?- [user].
p.
same(A,A).
?- X = (_+\p), same(X, Y), call(Y).
error(existence_error(procedure,p/0),p/0). % unexpected
?- X = (_+\p), call(X).
X = _A+\p. % expected
?- UPDT: I've found this behavior during learning semantics of goal expansion for #2532 |
Same problem when all is dynamic:
|
Even
|
What in tarnation!!???? ?- [user].
:- use_module(library(lambda)).
p.
a(\p).
?- G = (\p), call(G).
G = \p.
?- a(G), call(G).
error(existence_error(procedure,p/0),p/0).
?- a(G0), G = (\p), G0 = G, call(G).
G0 = \p, G = \p.
?- a(G0), G = (\p), G0 = G, call(G0).
% G0 and G unified, why does one work and the
% other give an error!!??
error(existence_error(procedure,p/0),p/0). |
This seems to be the ultimate cause for aarroyoc/scryer-playground#20. I couldn't reduce this for a custom predicate instead of
(+\)/2
, so I guess the problem is there, maybe inno_hat_call/1
?The text was updated successfully, but these errors were encountered: