diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-06-24 00:21:41 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-06-24 00:21:41 -0700 |
commit | f4af19feab59a5c9d6a045d34fbc7ebd4592999b (patch) | |
tree | c5a256a1ecd44adb4d9c3d076b1561e286aa1287 | |
parent | fc0b68f105a191c7cd4dbb85251ada870119d470 (diff) | |
download | txr-f4af19feab59a5c9d6a045d34fbc7ebd4592999b.tar.gz txr-f4af19feab59a5c9d6a045d34fbc7ebd4592999b.tar.bz2 txr-f4af19feab59a5c9d6a045d34fbc7ebd4592999b.zip |
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.
-rw-r--r-- | share/txr/stdlib/struct.tl | 4 |
1 files 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))))))))))) |