From d8a947546084843ca7700cdd5c885eb78868ac8a Mon Sep 17 00:00:00 2001 From: Nicolas Luck Date: Sat, 22 Jul 2023 00:30:51 +0200 Subject: [PATCH] Add missing list_last_item to lib_toplevel.pl and increase MaxDepth of write_eq to avoid truncation of results --- src/lib_toplevel.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/lib_toplevel.pl b/src/lib_toplevel.pl index 70ece273..a7c8df13 100644 --- a/src/lib_toplevel.pl +++ b/src/lib_toplevel.pl @@ -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) ). -- 2.54.0