improve retract/1 and related predicates (#1598)

This commit is contained in:
Mark Thom
2023-01-22 20:14:36 -07:00
parent 5e0e3e2754
commit a7e93db363
11 changed files with 315 additions and 107 deletions

View File

@@ -371,22 +371,11 @@ impl IndexStore {
module: Atom,
) -> Option<CodeIndex> {
if module == atom!("user") {
/*match ClauseType::from(name, arity) {
ClauseType::Named(arity, name, _) => */
self.code_dir.get(&(name, arity)).cloned()
/* _ => None,
}*/
} else {
self.modules
.get(&module)
.and_then(|module|/* |module| match ClauseType::from(name, arity) {
ClauseType::Named(arity, name, _) => { */
module.code_dir.get(&(name, arity)).cloned()
/*
}
_ => None,
} */
)
.and_then(|module| module.code_dir.get(&(name, arity)).cloned())
}
}