]> Repositorios git - scryer-prolog.git/commitdiff
Add missing list_last_item to lib_toplevel.pl and increase MaxDepth of write_eq to...
authorNicolas Luck <[email protected]>
Fri, 21 Jul 2023 22:30:51 +0000 (00:30 +0200)
committerNicolas Luck <[email protected]>
Fri, 21 Jul 2023 22:31:49 +0000 (00:31 +0200)
src/lib_toplevel.pl

index 70ece27320246c9ea45cc2f5e3e0e36cf867ec81..a7c8df13333f3eb273ae6c873444648e717cb3d3 100644 (file)
@@ -101,6 +101,10 @@ write_eq((G1, G2), VarList, MaxDepth) :-
 write_eq(G, VarList, MaxDepth) :-
     write_last_goal(G, VarList, MaxDepth).
 
+list_last_item([C], C) :- !.
+list_last_item([_|Cs], D) :-
+    list_last_item(Cs, D).
+    
 term_variables_under_max_depth(Term, MaxDepth, Vars) :-
     '$term_variables_under_max_depth'(Term, MaxDepth, Vars).
 
@@ -134,12 +138,12 @@ write_eqs_and_read_input(B, VarList) :-
        (  Goals == [] ->
           write('true.'), nl
        ;  loader:thread_goals(Goals, ThreadedGoals, (',')),
-          write_eq(ThreadedGoals, NewVarList0, 20),
+          write_eq(ThreadedGoals, NewVarList0, 200000),
           write('.'),
           nl
        )
     ;  loader:thread_goals(Goals, ThreadedGoals, (',')),
-       write_eq(ThreadedGoals, NewVarList0, 20),
+       write_eq(ThreadedGoals, NewVarList0, 200000),
        read_input(ThreadedGoals, NewVarList0)
     ).