Re: metacall being abolished.
Alan Baljeu <[email protected]>
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Yes, that's it. In fact I changed ignore to "log an error message but ignore the failures", but yes. Alan Baljeu ----- Original Message ----- From: Jan Wielemaker <[email protected]> To: Alan Baljeu <[email protected]> Cc: Prolog <[email protected]> Sent: Thursday, July 18, 2013 10:43:46 AM Subject: Re: [SWIPL] metacall being abolished. On 07/18/2013 04:05 PM, Alan Baljeu wrote: > In one file I have this: > model_post(Spec) :- > model:maplist(ignore, Spec). I guess this is not handled correctly. Not immediately sure how to fix this either. I'm mostly wondering what you are trying to do. I much more intuitive way would be to write model_post(Spec) :- maplist(model:ignore, Spec). which will work correctly. Its not very clear to me what you are trying to achieve. Call ignore(model:Item) for each element in Spec? Anyway, this works fine: == :- use_module(library(apply_macros)). model:test :- writeln(hello). test :- model_post([test]). model_post(Spec) :- maplist(model:ignore, Spec). == Cheers --- Jan > > Subsequently when I recompile model.pl, I get this error: > � � � � Loading module model abolished: [model:__aux_maplist/2_ignore+0/1] > > and > Warning: The predicates below are not defined. If these are defined > > Warning: at runtime using assert/1, use :- dynamic Name/Arity. > Warning:� > Warning: model:'__aux_maplist/2_ignore+0'/1, which is referenced by... > > > The aux predicate should have been created in the� > other module. �The only remedy I can think of is to manually force the original� > file to recompile every time. �This is a major nuissance. � > > Alan Baljeu� > _______________________________________________ > SWI-Prolog mailing list > [email protected] > https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > _______________________________________________ SWI-Prolog mailing list [email protected] https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog