From: Mark Date: Sun, 19 Nov 2023 15:46:20 +0000 (-0700) Subject: remove unnecessary spaces around (|) (#2164) X-Git-Tag: v0.9.4~112 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=8d9a759a7d868c96742a396cdd966d09420eee29;p=scryer-prolog.git remove unnecessary spaces around (|) (#2164) --- diff --git a/src/heap_print.rs b/src/heap_print.rs index cbfbbd49..14ee274d 100644 --- a/src/heap_print.rs +++ b/src/heap_print.rs @@ -1762,7 +1762,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> { while let Some(loc_data) = self.state_stack.pop() { match loc_data { TokenOrRedirect::Atom(atom) => self.print_impromptu_atom(atom), - TokenOrRedirect::BarAsOp => append_str!(self, " | "), + TokenOrRedirect::BarAsOp => append_str!(self, "|"), TokenOrRedirect::Char(c) => print_char!(self, self.quoted, c), TokenOrRedirect::Op(atom, op) => { self.print_op(&atom.as_str()); diff --git a/tests-pl/iso-conformity-tests.pl b/tests-pl/iso-conformity-tests.pl index 2f8adec1..bfd74c61 100644 --- a/tests-pl/iso-conformity-tests.pl +++ b/tests-pl/iso-conformity-tests.pl @@ -783,10 +783,10 @@ test_217_181_290_317 :- ( op(1105,xfy,'|'), read_from_chars("(a-->b,c|d).", T0), writeq_term_to_chars(T0, C0), - C0 == "a-->b,c | d", + C0 == "a-->b,c|d", read_from_chars("[(a|b)].", T1), writeq_term_to_chars(T1, C1), - C1 == "[(a | b)]", + C1 == "[(a|b)]", read_from_chars("[a,(b,c)|[]].", T2), writeq_term_to_chars(T2, C2), C2 == "[a,(b,c)]"