`var/1`

in compilers whose module system derives from the Quintus module system. Nevertheless, I hope that, at least in the case of Logtalk, I can continue to avoid these issues without resorting to a type inference system.
]]>I guess this is an artefact of the static rewriting process for modules

and as well most probably of the fact that var/1 is not declared as

having a goal argument.

So basically when there would be two types term and formula, then the argument of mp would have the type formula, and the argument of var would have the type term. Leading to the conclusion that the clause is not well typed, provided that term and formula are disjoint types.

An alternative workaround would be to have a second var/1 predicate, lets say var_2/1, with argument type formula. And this could have a different functioning than var. Or we overload var/1 with var_2/1 and let some type inference decide.

But this is just a high level shoot from the hip.

Bye

]]>