Suppose I have a broken program like this:
:- set_prolog_flag(verbose, silent).
:- initialization(main).
main :-
not_valid(X),
halt.
main :-
halt(1).
When I run it, SWI-Prolog tries to recover by entering an interactive mode:
swipl ./test.pl
Warning: /home/foo/test.pl:4:
Singleton variables: [X]
ERROR: /home/foo/test.pl:2: Initialization goal raised exception:
ERROR: main/0: Undefined procedure: not_valid/1
?-
How can I make it crash instead?
swipl --version
SWI-Prolog version 7.6.4 for amd64