-
Notifications
You must be signed in to change notification settings - Fork 146
meta_predicate
doesn't accept predicate indicator sequence nor list
#2444
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
* predicate_property/2 removed, because it isn't working (mthom#2443) * meta_predicate instruction was split (mthom#2444) * Few changes were adopted from SWI variant[1], because it has similar handling of (:)/2 with predicates in modules. * Scryer specific changes [1]: http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/swi/reif.pl
* predicate_property/2 removed, because it isn't working (mthom#2443) * meta_predicate instruction was split (mthom#2444) * Few changes were adopted from SWI variant[1], because it has similar handling of (:)/2 with predicates in modules. * Scryer specific changes [1]: http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/swi/reif.pl
user:term_expansion((:- meta_predicate(Metas)), MetaResults) :-
ground(Metas),
Metas= [Meta| OtherMetas],
expand_meta_list([Meta| OtherMetas], MetaResults).
expand_meta_list([], _, _, []).
expand_meta_list([Meta| OtherMetas], [(:- meta_predicate(Meta)) | OtherResults]) :-
expand_meta_list(OtherMetas, OtherResults). |
Ineteresting idea, I initially thought to add two more instructions to dispatch.rs: UPDT: Also I'm not sure, but it looks like meta_predicate handling is done during preprocessing stage, ie before goal expansion. |
* predicate_property/2 removed, because it isn't working (mthom#2443) * meta_predicate instruction was split (mthom#2444) * Few changes were adopted from SWI variant[1], because it has similar handling of (:)/2 with predicates in modules. * Scryer specific changes [1]: http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/swi/reif.pl
* predicate_property/2 removed, because it isn't working (mthom#2443) * meta_predicate instruction was split (mthom#2444) * Few changes were adopted from SWI variant[1], because it has similar handling of (:)/2 with predicates in modules. * Scryer specific changes [1]: http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/swi/reif.pl
* predicate_property/2 removed, because it isn't working (mthom#2443) * meta_predicate instruction was split (mthom#2444) * Few changes were adopted from SWI variant[1], because it has similar handling of (:)/2 with predicates in modules. * Scryer specific changes [1]: http://www.complang.tuwien.ac.at/ulrich/Prolog-inedit/swi/reif.pl
In order to maintain compatibility with SICStus which was discovered while trying to run original reif.pl implementation, it looks like
meta_predicate
directive should be extended to accept predicate indicator sequence and list (similar to #1586).I've tried to do it myself, but code for registering meta-predicate records differs from other directives quite significantly that I couldn't just copy/adapt code from others.
The text was updated successfully, but these errors were encountered: