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 --- builtins.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'builtins.c') diff --git a/builtins.c b/builtins.c index cdea48a..0256699 100644 --- a/builtins.c +++ b/builtins.c @@ -893,7 +893,6 @@ int builtinreadterm(Term *goal, Binding **bindings, Module *module) { USED(bindings); - USED(module); Term *stream = goal->children; Term *term = stream->next; @@ -911,7 +910,7 @@ builtinreadterm(Term *goal, Binding **bindings, Module *module) Throw(permissionerror(L"input", L"binary_stream", stream)); Term *realterm; - int error = readterm(stream, &realterm); + int error = readterm(stream, &realterm, module); if(error) Throw(realterm); @@ -942,7 +941,7 @@ builtinreadterm(Term *goal, Binding **bindings, Module *module) varsnames = varsandnames(uniquevars); singlevars = singletons(allvars); } - + Term *op; for(op = options; op->tag == CompoundTerm; op = op->children->next){ Term *opkey = op->children->children; -- cgit v1.2.3