In library(option) option/2 has what looks like an inconsistency. Consider:
?- option(format(F),[format(text)]).
F = text.
?- option(format(F),[format=text]).
F = text.
This is as expected. Then if we do:
?- option(format=F,[format(text)]).
false.
Also as expected since the first arg is supposed to be in canonical format as above. But if we try:
?- option(format=F,[format=text]).
F = text.
So the =/2 format works but only if the option is also in that format. Seems slightly inconsistent. In the docs =/2 is not supposed to be supported for arg 1 but works in the last example.
I ran across this trying to use library(option) to process key/value pair lists. I can’t use it after all for other reasons, but I was curious about the behavior I saw above. Is there a specific reason for it?
Thanks