From: Markus Triska Date: Sat, 18 Apr 2020 15:47:24 +0000 (+0200) Subject: ENHANCED: the toplevel interaction now supports RETURN as a synonym for "." X-Git-Tag: v0.8.123~134 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=450591d5a9a7f4fd8efb3212bce398d5542923c6;p=scryer-prolog.git ENHANCED: the toplevel interaction now supports RETURN as a synonym for "." This is made possible due to the recent improvements by @notoria. --- diff --git a/README.md b/README.md index 4fa1bab5..652e7b98 100644 --- a/README.md +++ b/README.md @@ -168,8 +168,8 @@ predicates it defines. For example, with the program shown above: ; What = pure_world. ``` -Press `SPACE` to show further answers, if any exist. Press `.` to -abort the search and return to the toplevel prompt. +Press `SPACE` to show further answers, if any exist. Press `RETURN` or + `.` to abort the search and return to the toplevel prompt. Press `h` to show a help message. To quit Scryer Prolog, use the standard predicate `halt/0`: diff --git a/src/prolog/toplevel.pl b/src/prolog/toplevel.pl index d15e0f6d..9538c5ac 100644 --- a/src/prolog/toplevel.pl +++ b/src/prolog/toplevel.pl @@ -162,7 +162,7 @@ ; C = h -> '$help_message', '$read_input'(ThreadedGoals, NewVarList) - ; C = '.' -> + ; member(C, ['\n', .]) -> nl, write('; ...'), nl ; '$read_input'(ThreadedGoals, NewVarList) ). @@ -170,7 +170,7 @@ '$help_message' :- nl, nl, write('SPACE, "n" or ";": next solution, if any\n'), - write('".": stop enumeration\n'), + write('RETURN or ".": stop enumeration\n'), write('"h": display this help message\n'), write('"w": write terms without depth limit\n'), write('"p": print terms with depth limit\n\n').