From 6dcefcfb716680437575ec19bfbe8d0b44d6a0ec Mon Sep 17 00:00:00 2001 From: Markus Triska Date: Sat, 18 Apr 2020 17:40:19 +0200 Subject: [PATCH] small simplifications --- src/prolog/toplevel.pl | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/prolog/toplevel.pl b/src/prolog/toplevel.pl index f2adba33..09131d6d 100644 --- a/src/prolog/toplevel.pl +++ b/src/prolog/toplevel.pl @@ -146,24 +146,22 @@ '$read_input'(ThreadedGoals, NewVarList) :- get_single_char(C), - ( C == w -> + ( C = w -> nl, write(' '), '$write_eq'(ThreadedGoals, NewVarList, 0), '$read_input'(ThreadedGoals, NewVarList) - ; C == p -> + ; C = p -> nl, write(' '), '$write_eq'(ThreadedGoals, NewVarList, 20), '$read_input'(ThreadedGoals, NewVarList) - ; C == (';') -> + ; member(C, [';', ' ']) -> nl, write('; '), false - ; C == (' ') -> - nl, write('; '), false - ; C == h -> + ; C = h -> '$help_message', '$read_input'(ThreadedGoals, NewVarList) - ; C == '.' -> + ; C = '.' -> nl, write('; ...'), nl ; '$read_input'(ThreadedGoals, NewVarList) ). -- 2.54.0