diff options
author | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-07-22 22:24:18 +0000 |
---|---|---|
committer | Peter Mikkelsen <peter@pmikkelsen.com> | 2021-07-22 22:24:18 +0000 |
commit | 9cc17961834515fd9e09683738a0137964076dd7 (patch) | |
tree | 1ec66d74fc371a6fdacda0398147afc70514c657 | |
parent | 48da622d4ad0b4acfe9005dd318ac3f20b4e8672 (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.c | 5 | ||||
-rw-r--r-- | system.pl | 1 |
2 files changed, 1 insertions, 5 deletions
@@ -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; @@ -66,7 +66,6 @@ _ -> _ ; Else :- If ; _ :- If. - _ ; Else :- Else. |