]> Repositorios git - scryer-prolog.git/commitdiff
correct bug, dead code in toplevel.pl
authorMark Thom <[email protected]>
Sat, 23 Nov 2019 03:38:03 +0000 (20:38 -0700)
committerMark Thom <[email protected]>
Sat, 23 Nov 2019 03:38:03 +0000 (20:38 -0700)
src/prolog/toplevel.pl

index 6b24e2ca7631f27940465bc2aa61c87b85f2b482..ba2b0ee96d6420cb228f41160e00b1da50f1f64c 100644 (file)
@@ -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.
          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 == (';'), !,