]> Repositorios git - scryer-prolog.git/commitdiff
fix cut expansions, clean up code.
authorMark Thom <[email protected]>
Sat, 7 Apr 2018 23:08:01 +0000 (17:08 -0600)
committerMark Thom <[email protected]>
Sat, 7 Apr 2018 23:08:01 +0000 (17:08 -0600)
src/prolog/ast.rs
src/prolog/parser

index 113084c1364aeefa5f81c71cf6c45f91c4847e2b..47fbf49cc935fabf0aaa4a62c030ef313b49aa18 100644 (file)
@@ -103,19 +103,7 @@ impl GenContext {
 
 pub struct Predicate(pub Vec<PredicateClause>);
 
-impl Predicate {
-    pub fn name(&self) -> Option<ClauseName> {
-        self.0.first().and_then(|t| t.name())
-    }
-
-    pub fn arity(&self) -> usize {
-        if let Some(ref clause) = self.0.first() {
-            clause.arity()
-        } else {
-            0
-        }        
-    }
-    
+impl Predicate {    
     pub fn clauses(self) -> Vec<PredicateClause> {
         self.0
     }
index ba9bd0098e66227006b799a6c5c2c583fa9d9009..0969b6f0e6c687f4beace699ab40f098a0cd58c9 160000 (submodule)
@@ -1 +1 @@
-Subproject commit ba9bd0098e66227006b799a6c5c2c583fa9d9009
+Subproject commit 0969b6f0e6c687f4beace699ab40f098a0cd58c9