You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
current_predicate/1 cannot be used to obtain all predicates that are currently defined, because current_predicate/1 only succeeds for user-defined predicates.
The text was updated successfully, but these errors were encountered:
triska
changed the title
current_predicate/1 does not describe all current predicates
A way to detect all available predicates would be useful
Oct 5, 2024
Well, I think this would go against the ISO Standard, see #153. I also think this would be saner behavior, but maybe we should add a different predicate in library(iso_ext) that does that so that current_predicate/1 is still ISO compliant.
EDIT: Oh, you already addressed that by putting the functionality in predicate_property/2 instead. Seems nice.
Yes, good catch, I have already edited the original suggestion to suggest predicate_property/2 instead, because current_predicate/1 cannot be used for the reason you mention, thank you for spotting this!
Motivation: Precompile a set of facts that let us quickly recognize built-in predicates: #2599
Which built-in predicates are there?
Ideally,
predicate_property/2
would tell us.current_predicate/1
cannot be used to obtain all predicates that are currently defined, becausecurrent_predicate/1
only succeeds for user-defined predicates.The text was updated successfully, but these errors were encountered: