From 999d8e65b03023d1af7b9d5654c4f0477673d112 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 4 Apr 2018 23:41:07 -0700 Subject: compiler: bugfix: quasilit cannot use append. append is too generic, and produces nil sometimes. Let's use a custom run-time support function sys:fmt-join. * eval.c (fmt_join): New function. (eval_init): Intern sys:fmt-join. * share/txr/stdlib/compiler.tl (expand-quasi): Generate a sys:fmt-join call to combine the pieces rather than append. --- share/txr/stdlib/compiler.tl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'share') diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index 1926885e..24fa5c2a 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -1097,7 +1097,7 @@ (defun expand-quasi (form) (let ((qa (expand-quasi-args form))) - ^(append ,*qa))) + ^(sys:fmt-join ,*qa))) (defun expand-dohash (form) (mac-param-bind form (op (key-var val-var hash-form : res-form) . body) form -- cgit v1.2.3