]> Repositorios git - scryer-prolog.git/commitdiff
don't emit overwriting warnings for term_expansion/2 or goal_expansion/2
authorMark Thom <[email protected]>
Sat, 14 Mar 2020 20:18:01 +0000 (14:18 -0600)
committerMark Thom <[email protected]>
Sat, 14 Mar 2020 20:18:01 +0000 (14:18 -0600)
src/prolog/machine/mod.rs
src/prolog/machine/term_expansion.rs

index 64bc4dd936eaf9e03e0c836ab5daf5b7c745b07f..8ee6413653755d5f2609456409bff9441afad356 100644 (file)
@@ -150,7 +150,15 @@ impl SubModuleUser for IndexStore {
     fn insert_dir_entry(&mut self, name: ClauseName, arity: usize, idx: CodeIndex) {
         if let Some(ref code_idx) = self.code_dir.get(&(name.clone(), arity)) {
             if !code_idx.is_undefined() {
-                println!("Warning: overwriting {}/{}", &name, arity);
+                match (name.as_str(), arity) {
+                    ("term_expansion", 2) => {
+                    }
+                    ("goal_expansion", 2) => {
+                    }
+                    _ => {
+                        println!("Warning: overwriting {}/{}", &name, arity);
+                    }
+                }
             }
 
             let (p, module_name) = idx.0.borrow().clone();
index 969e00c2b732b8f31d3c570d3d73f445a15a27db..94ad5951765dd2e439cf7aa216539712b535576a 100644 (file)
@@ -380,7 +380,7 @@ impl MachineState {
 
             self.reset_with_heap_preservation();
 
-            Some(output.result()))
+            Some(output.result())
         }
     }
 }