scryer-prolog
scryer-prolog copied to clipboard
'a' should be callable
Scryer Prolog assures me that 'a'
and a
are the same thing, but 'a'.
and a.
give different errors in the REPL:
$ scryer-prolog
?- 'a' = a.
true.
?- a.
caught: error(existence_error(procedure,a/0),a/0)
?- 'a'.
caught: error(type_error(callable,a),call/2)
I would expect them to behave identically.
Strictly speaking, the top level may do what it wants with errors since the toplevel is out of scope. However, taking the essence of your case makes it truly non-conforming:
?- catch('a',error(E,_),true).
E = type_error(callable,a). % unexpected
Expected: E = existence_error(procedure,a/0).
This works exactly as expected now:
?- a. caught: error(existence_error(procedure,a/0),a/0)