summaryrefslogtreecommitdiff
path: root/dat.h
diff options
context:
space:
mode:
Diffstat (limited to 'dat.h')
-rw-r--r--dat.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/dat.h b/dat.h
index d5dbfef..a090afb 100644
--- a/dat.h
+++ b/dat.h
@@ -1,5 +1,8 @@
typedef struct Term Term;
typedef struct Binding Binding;
+typedef struct Goal Goal;
+typedef struct Choicepoint Choicepoint;
+typedef int (*Builtin)(Term *, Term *, Goal **, Choicepoint **, Binding **);
struct Term
{
@@ -23,6 +26,20 @@ struct Binding
Binding *next;
};
+struct Goal
+{
+ Term *goal;
+ Goal *next;
+};
+
+struct Choicepoint
+{
+ Goal *goalstack;
+ Term *retryclause;
+ uvlong id; /* Unique number for each clause. Used to know where to cut to. */
+ Choicepoint *next;
+};
+
enum {
CompoundTerm,
AtomTerm,