From c85de58a2047c4858825d03977e490db6168fbe3 Mon Sep 17 00:00:00 2001 From: Peter Mikkelsen Date: Fri, 23 Jul 2021 00:50:18 +0000 Subject: Simplify parsing a bit, and make sure the prolog loader calls read_term with the correct module to pick up the correct operators --- eval.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'eval.c') diff --git a/eval.c b/eval.c index 4391110..6e0947c 100644 --- a/eval.c +++ b/eval.c @@ -66,6 +66,17 @@ evalquery(Term *query) name = prettyprint(goal, 0, 0, 0, nil); arity = 0; } + print("Didn't find predicate %S in module %S\n", prettyprint(goal, 0, 0, 0, nil), module->name); + Predicate *p; + for(p = module->predicates; p != nil; p = p->next) + print("Available in %S: %S/%d\n", module->name, p->name, p->arity); + Module *sysmod; + if(systemmoduleloaded) + sysmod = getmodule(L"system"); + else + sysmod = getmodule(L"user"); + for(p = sysmod->predicates; p != nil; p = p->next) + print("Available in %S: %S/%d\n", sysmod->name, p->name, p->arity); switch(flagunknown){ case UnknownError: procedure = mkatom(name); -- cgit v1.2.3