Hello swi-prolog users,
I have developed a swi-prolog program to help me in my daily work. It was developed through several years so it has very large files of code.
This software seemed to be fine until I have tried to run it using swi-prolog 8.2.4.
Now when I run consult/1 predicate I receive error messages which I report below. However this do not happen before, while using swi-prolog version 7.
Can anybody give me some help about this? Thank you in advance,
ERROR: catch/3: Unknown procedure: module/2
ERROR: However, there are definitions for:
Warning: Goal (directive) failed: user:module(structure_main,[common_Editor/0,cE/0,abrir_Structure/0,dialog_salvar_sair_Structure/1,reDraw_structure_building/1,dia...
Looks like there is something in the file before the module header? AFAIK the only changes in this area are stricter checking, i.e., older versions handling incorrect declarations silently in some wrong way. If this doesn’t help, please include the start of the file.
Since the problem remained I include the start of the file,
[ mzCAD_data_base/9, rctCAD_data_base/4,
:- require([defs/2, change_icon_dialog_2/2,
Jan Wielemaker via SWI-Prolog <email@example.com> escreveu no dia quarta, 28/04/2021 à(s) 09:38:
That looks fine, unless there is something hidden at the start of the file. Assuming that is not the case the next suspicious cause are term_expansion/2 rules that expand the module header by adding something before it. Does the problem go away if you only load this file? If so I’d search for term_expansion that might do strange things and otherwise bisect the problem by removing and re-adding parts of the rest of the program. Seems a weird issue …
Perhaps there are things that might cause problems, For instance
I have a statement like the following one which is below the code that I have just sent to you
Thank you so much
Jan Wielemaker via SWI-Prolog <firstname.lastname@example.org> escreveu no dia quarta, 28/04/2021 à(s) 12:22:
This as such still works as it is used all over the place in the xpce libraries. We really need a (preferably) small complete piece of code and what to do. As is, it is magic and just about anything may cause this. Could you (for example) load this file using include/1?