From: Mark Thom Date: Tue, 11 Jan 2022 00:26:57 +0000 (-0700) Subject: correctly print [] functors (#1189) X-Git-Tag: v0.9.0^2~82 X-Git-Url: https://git.sagredo.dev/?a=commitdiff_plain;h=ef0b239e7031cea7d7b6cfce6d7c18383afbea2b;p=scryer-prolog.git correctly print [] functors (#1189) --- diff --git a/src/heap_print.rs b/src/heap_print.rs index e1c4e214..f7ba606c 100644 --- a/src/heap_print.rs +++ b/src/heap_print.rs @@ -1358,7 +1358,7 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> { read_heap_cell!(addr, (HeapCellValueTag::Atom, (name, arity)) => { - if name == atom!("[]") { + if name == atom!("[]") && arity == 0 { if !self.at_cdr("") { append_str!(self, "[]"); }