For me it worked actually. And I post it here with a certain happiness, because it was one of the few times things worked…without issuing any warnings, error messages, strange non-existent modules, dependencies, certificates and so on
The problem is that goal_expansion/2 uses normal unification. So, if it encounters the goal A = B, this also unifies. That is where the warning is about. So, you need something like this:
P.s. op(600, xfx, '--' ). can simply be op(600, xfx, -- ).. Being an operator or not does not imply whether or not quotes are required. Besides the usual atoms of letters, sequences of graph characters also make up an atom without the need for quotes.
By the way, thanks for letting me discover this predicate select/3 which I didn’t know about… similar to member/2 in some way but with a further argument position. You can use it as member/2 if you use an anonymous variable, but it doesn’t make much sense of course