From e9e5c28be60ffdb8100d356cacbaece8d101c15b Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 24 Jun 2019 00:21:41 -0700 Subject: lnew: two regressions fixed. * share/txr/stdlib/struct.tl (sys:new-expander): The syntax (lnew (type boa args ...)) is not being handled at all due a typo in the case. Moreover, the syntax (lnew type slot0 val0 slot1 val1 ...) is broken due to a missing unquote on the type gensym in the output template. --- share/txr/stdlib/struct.tl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/txr/stdlib/struct.tl b/share/txr/stdlib/struct.tl index 424748e7..67b50b9c 100644 --- a/share/txr/stdlib/struct.tl +++ b/share/txr/stdlib/struct.tl @@ -261,7 +261,7 @@ ((new new*) (if qpairs ^(make-struct ,type (list ,*qpairs) ,*args) ^(struct-from-args ,type ,*args))) - ((new* lnew*) ^(make-lazy-struct ,type + ((lnew lnew*) ^(make-lazy-struct ,type (lambda () (cons (list ,*qpairs) (list ,*args)))))))) @@ -269,7 +269,7 @@ (let ((type (sys:new-type op form texpr))) (caseq op ((new new*) ^(struct-from-plist ,type ,*qpairs)) - ((lnew lnew*) ^(make-lazy-struct type + ((lnew lnew*) ^(make-lazy-struct ,type (lambda () (list (list ,*qpairs))))))))))) -- cgit v1.2.3