A way to detect all available predicates would be useful
Motivation: Precompile a set of facts that let us quickly recognize built-in predicates: https://github.com/mthom/scryer-prolog/discussions/2599
Which built-in predicates are there?
?- predicate_property(A, built_in). error(instantiation_error,predicate_property/2).
Ideally, predicate_property/2 would tell us.
current_predicate/1 cannot be used to obtain all predicates that are currently defined, because current_predicate/1 only succeeds for user-defined predicates.
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!