From 24ffdc27247a0ab91ff025831d5853169ce4e5ed Mon Sep 17 00:00:00 2001 From: Mark Thom Date: Fri, 22 Nov 2019 20:38:03 -0700 Subject: [PATCH] correct bug, dead code in toplevel.pl --- src/prolog/toplevel.pl | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/prolog/toplevel.pl b/src/prolog/toplevel.pl index 6b24e2ca..ba2b0ee9 100644 --- a/src/prolog/toplevel.pl +++ b/src/prolog/toplevel.pl @@ -1,8 +1,8 @@ -:- module('$toplevel', ['$repl'/1, consult/1, use_module/1, use_module/2]). - :- use_module(library(lists)). :- use_module(library(si)). +:- module('$toplevel', ['$repl'/1, consult/1, use_module/1, use_module/2]). + '$repl'(ListOfModules) :- maplist('$use_list_of_modules', ListOfModules), false. @@ -29,9 +29,10 @@ catch('$$compile_batch', E, '$print_exception_with_check'(E)) ; consult(Item) ) - ; catch(throw(error(type_error(atom, Item), repl/0)), + ; !, + catch(throw(error(type_error(atom, Item), repl/0)), E, - '$print_exception_with_check'(E)) + '$print_exception_with_check'(E)) ). '$instruction_match'(Term, VarList) :- '$submit_query_and_print_results'(Term, VarList), @@ -91,8 +92,7 @@ write(' .'), nl ) - ; repeat, - thread_goals(Goals, ThreadedGoals, (',')), + ; thread_goals(Goals, ThreadedGoals, (',')), '$write_eq'(ThreadedGoals, VarList), '$raw_input_read_char'(C), ( C == (';'), !, -- 2.54.0