Destroy findall bags

Hello,
I am working through examples in paragraph 3 of Learn prolog now!
I always get that error/message. I googled it and I cannot get what I am supposed to reply:

call('$bags':'$destroy_findall_bag') ? 

I just restart the program but this is not optimal :). What does it signify?

Does that call occurs during a trace of a query?

Most likely trapping the debugger after an error. What is interesting is at least the message before and the program also helps a lot in giving a meaningful answer.

It occurs when I try to leave a program.

[trace]  ?- ['/Users/ai/Desktop/Logik/matrioshki.pl'].
^  Call: (23) call('$bags':'$destroy_findall_bag') ? 

This is the last message when I try to recompile the code.

You are still in trace mode. Simply hit ā€˜nā€™ (nodebug). The interaction using

?- trace.
[trace] ?- mygoal.

is the standard way of doing this in Prolog, but it leads to these misconceptions. Totally suspending trace when loading a file is possible, but would make it impossible to debug user code that can be involved in the compilation (e.g., macros).

I always use

?- trace, mygoal.

And in most cases gtrace as below to use the graphical frontend.

?- gtrace, mygoal.

What about this change:

  • If trace (or debug, etc) appears on its own as command, act as now with a message indicating it is deprecated.
  • Restore to normal mode on the completion of every toplevel query (except the above sole trace).
1 Like

2 posts were split to a new topic: What does myGoal mean?