diff options
Diffstat (limited to 'dat.h')
-rw-r--r-- | dat.h | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -3,6 +3,7 @@ typedef struct Binding Binding; typedef struct Goal Goal; typedef struct Choicepoint Choicepoint; typedef struct Clause Clause; +typedef struct Predicate Predicate; typedef struct Module Module; typedef int (*Builtin)(Term *, Binding **); @@ -37,7 +38,8 @@ struct Goal struct Choicepoint { Goal *goalstack; - Clause *retryclause; + Clause *alternative; + Binding *altbindings; uvlong id; /* Unique number for each clause. Used to know where to cut to. */ Module *currentmodule; Choicepoint *next; @@ -52,11 +54,19 @@ struct Clause Clause *next; }; +struct Predicate +{ + Rune *name; + int arity; + Clause *clauses; + Predicate *next; +}; + struct Module { /* What about imports */ Rune *name; - Clause *clauses; + Predicate *predicates; Module *next; }; |