From: Markus Triska Date: Sat, 18 Apr 2020 15:40:19 +0000 (+0200) Subject: small simplifications X-Git-Tag: v0.8.123~135 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=5c4863dfb1690de572271eff6c78aff15556ae6c;p=scryer-prolog.git small simplifications --- diff --git a/src/prolog/toplevel.pl b/src/prolog/toplevel.pl index 4ca9ab41..d15e0f6d 100644 --- a/src/prolog/toplevel.pl +++ b/src/prolog/toplevel.pl @@ -147,24 +147,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) ).