shithub: pprolog

Download patch

ref: 9cc17961834515fd9e09683738a0137964076dd7
parent: 48da622d4ad0b4acfe9005dd318ac3f20b4e8672
author: Peter Mikkelsen <[email protected]>
date: Thu Jul 22 18:24:18 EDT 2021

Fix ; again haha, I can't just wrap variable goals in call/1 due to cuts being local in a call

--- a/builtins.c
+++ b/builtins.c
@@ -1120,14 +1120,11 @@
 		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;
--- a/system.pl
+++ b/system.pl
@@ -66,7 +66,6 @@
 
 If ; _ :-
 	If.
-
 _ ; Else :-
 	Else.