summaryrefslogtreecommitdiff
path: root/module.c
diff options
context:
space:
mode:
authorPeter Mikkelsen <peter@pmikkelsen.com>2021-07-08 21:54:27 +0000
committerPeter Mikkelsen <peter@pmikkelsen.com>2021-07-08 21:54:27 +0000
commitd2a0828140c31514c514b8e4fb9a4d52c389d8fe (patch)
tree01b461851fbae13f1d37fd880fe6ac21922de613 /module.c
parente9f5f2ffcc62eee564d37d5776e701bab548a496 (diff)
Add current_predicate/1 builtin
Diffstat (limited to 'module.c')
-rw-r--r--module.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/module.c b/module.c
index 45d0797..bd7ca22 100644
--- a/module.c
+++ b/module.c
@@ -18,6 +18,11 @@ initmodules(void)
exits(nil);
}
+ Predicate *p;
+ for(p = systemmodule->predicates; p != nil; p = p->next){
+ p->builtin = 1;
+ }
+
usermodule = addemptymodule(L"user");
}
@@ -83,6 +88,7 @@ parsemodule(char *file)
currentpred->arity = arity;
currentpred->clauses = cl;
currentpred->public = 1; /* everything is public for now */
+ currentpred->builtin = 0;
currentpred->next = nil;
}else
currentpred->clauses = appendclause(currentpred->clauses, cl);