summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Mikkelsen <peter@pmikkelsen.com>2021-07-22 22:24:18 +0000
committerPeter Mikkelsen <peter@pmikkelsen.com>2021-07-22 22:24:18 +0000
commit9cc17961834515fd9e09683738a0137964076dd7 (patch)
tree1ec66d74fc371a6fdacda0398147afc70514c657
parent48da622d4ad0b4acfe9005dd318ac3f20b4e8672 (diff)
Fix ; again haha, I can't just wrap variable goals in call/1 due to cuts being local in a call
-rw-r--r--builtins.c5
-rw-r--r--system.pl1
2 files changed, 1 insertions, 5 deletions
diff --git a/builtins.c b/builtins.c
index 6dda64f..cdea48a 100644
--- a/builtins.c
+++ b/builtins.c
@@ -1120,14 +1120,11 @@ assertclause(Term *clause, Module *module, int after, int dynamic)
body = mkatom(L"true");
}
- if(body->tag == VariableTerm)
- body = mkcompound(L"call", 1, body);
-
if(head->tag == VariableTerm)
Throw(instantiationerror());
if(head->tag != AtomTerm && head->tag != CompoundTerm)
Throw(typeerror(L"callable", head));
- if(body->tag != AtomTerm && body->tag != CompoundTerm)
+ if(body->tag != AtomTerm && body->tag != CompoundTerm && body->tag != VariableTerm)
Throw(typeerror(L"callable", body));
Rune *name = head->text;
diff --git a/system.pl b/system.pl
index 9009ff6..cdfbaf3 100644
--- a/system.pl
+++ b/system.pl
@@ -66,7 +66,6 @@ _ -> _ ; Else :-
If ; _ :-
If.
-
_ ; Else :-
Else.