This is a reduced code of a project:
mi_term( MI_TERM, TERM, DICT_IN, DICT_OUT) :- MI_TERM \\== (*,*), call( MI_TERM, MI_TERM, TERM, DICT_IN, DICT_OUT).
main_001 :- true
, MI_TERM= ( current_input/1, read_string/5)
, mi_term( MI_TERM, TERM, STARTDICT, DICT)
.
I get the warning on make:
(ins)$ ./009.pl
Warning: /home/ox/tmp/2025_10_08_swipl_errormessage_analysis/009.pl:7:
Warning: Singleton variables: [TERM,STARTDICT,DICT]
Welcome to SWI-Prolog (threaded, 64 bits, version 9.3.20-DIRTY)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).(ins)?- make.
Warning: The predicates below are not defined. If these are defined
Warning: at runtime using assert/1, use :- dynamic Name/Arity.
Warning:
Warning: ‘,’/6, which is referenced by
Warning: /home/ox/tmp/2025_10_08_swipl_errormessage_analysis/009.pl:9:11: 1-st clause of main_001/0
true.
I see the relation between the term “MI_TERM= ( current_input/1, read_string/5)” and the call in mi_term/4 but it is not called because I have a guard there. In the actual code I have more than this 1 rule of mi_term/4 so don’t wonder when this snipped makes no sense, it is reduced to this minimum which creates the warning.
How can I get rid of this warning? (Not the singleton warning)