summaryrefslogtreecommitdiff
path: root/repl.pl
diff options
context:
space:
mode:
Diffstat (limited to 'repl.pl')
-rw-r--r--repl.pl12
1 files changed, 5 insertions, 7 deletions
diff --git a/repl.pl b/repl.pl
index 0bb279f..8f68551 100644
--- a/repl.pl
+++ b/repl.pl
@@ -1,17 +1,15 @@
:- module(repl, []).
repl([_ProgName|Args]) :-
- write('Welcome to p-prolog version 1.'),
- nl,
- write('Started with args: '),
- write(Args),
- nl,
- flush_output,
handle_args(Args),
- repl_loop.
+ ( member('--no-repl', Args)
+ -> halt
+ ; repl_loop
+ ).
handle_arg('-d') :-
set_prolog_flag(debug, on).
+handle_arg('--no-repl').
handle_arg(Arg) :-
loader:load_module_from_file(Arg).