summaryrefslogtreecommitdiff
path: root/repl.pl
diff options
context:
space:
mode:
Diffstat (limited to 'repl.pl')
-rw-r--r--repl.pl12
1 files changed, 10 insertions, 2 deletions
diff --git a/repl.pl b/repl.pl
index eb272a9..60521df 100644
--- a/repl.pl
+++ b/repl.pl
@@ -1,9 +1,17 @@
:- module(repl, []).
-repl :-
+repl(Args) :-
+ write('Welcome to p-prolog version 1'),
+ nl,
+ write('Started with args: '),
+ write(Args),
+ nl,
+ repl_loop.
+
+repl_loop :-
catch(read_eval_print, E, print_exception(E)),
'$collect_garbage',
- repl.
+ repl_loop.
read_eval_print :-
write('?- '),