Closed triska closed 6 hours ago
What version is this? This is a problem that was solved with https://github.com/mthom/scryer-prolog/pull/2475. On current master this works as intended:
use scryer_prolog::Machine;
pub fn main() -> () {
let mut machine = Machine::new_lib();
machine.load_module_string("facts", "colleague(joe, mike).".into());
let result = machine.run_query("colleague(joe, X).".into()).unwrap();
println!("{result:?}");
// Matches([QueryMatch { bindings: {"X": Atom("mike")} }])
}
Excellent, thank you a lot! I am closing this as resolved!
Today the following question was raised on the
#scryer
IRC channel, I file it here as an issue so that we remember it:Given the fact
colleague(joe, mike).
, when we query it withcolleague(joe, X).
, then we get asQueryResolution
:Matches([QueryMatch { bindings: {"X": String("mike")} }])
.Question: Why is
X
is bound toString("mike")
, instead of an atom?Can anyone confirm and explain this, and is more information needed here (@shawa)? Thank you a lot!