delay premature set_switch_var_offset_* calls in retract_clause, add module resolution for asserta/assertz/retract/clause

This commit is contained in:
Mark Thom
2021-02-05 17:12:25 -07:00
parent 1bc8e9aebf
commit 3fc2c4223b
8 changed files with 165 additions and 125 deletions

View File

@@ -494,14 +494,14 @@ impl Machine {
REPLCodePtr::CompilePendingPredicates => {
self.compile_pending_predicates();
}
REPLCodePtr::UserAssertz => {
self.compile_user_assert(AppendOrPrepend::Append);
REPLCodePtr::Assertz => {
self.compile_assert(AppendOrPrepend::Append);
}
REPLCodePtr::UserAsserta => {
self.compile_user_assert(AppendOrPrepend::Prepend);
REPLCodePtr::Asserta => {
self.compile_assert(AppendOrPrepend::Prepend);
}
REPLCodePtr::UserRetract => {
self.retract_user_clause();
REPLCodePtr::Retract => {
self.retract_clause();
}
}