Page 1 of 1

[bug][10.6.4] expansion macro rewrite fails -> workaround

PostPosted: Thu Aug 13, 2015 1:47 am
by hartrock
Tried after User Manual and Reference v.10.6.4:
Code: Select all
sr@free:~/newLISP$ newlisp
newLISP v.10.6.4 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h

> (macro (double X) (+ X X))
(lambda-macro (X) (expand '(+ X X)))
> (define double (lambda-macro (X) (expand '(add X X))))

ERR: symbol is protected in function define : double
>

Re: [bug][10.6.4] expansion macro rewrite does not work

PostPosted: Thu Aug 13, 2015 2:57 am
by ralph.ronnquist
Good catch. And it happens on 10.6.[23] as well.

Re: [bug][10.6.4] expansion macro rewrite does not work

PostPosted: Thu Aug 13, 2015 9:32 am
by hartrock
But it works with:
Code: Select all
sr@free:~/newLISP$ newlisp
newLISP v.10.6.4 64-bit on Linux IPv4/6 UTF-8 libffi, options: newlisp -h

> (macro (double X) (+ X X))
(lambda-macro (X) (expand '(+ X X)))
>  (constant 'double (lambda-macro (X) (expand '(add X X))))
(lambda-macro (X) (expand '(add X X)))
> double
(lambda-macro (X) (expand '(add X X)))
>

So this seems to be a minor issue.

PS: Is this the best place for such reports? Is it OK, to delete this post after a fix?

Re: [bug][10.6.4] expansion macro rewrite fails -> workaroun

PostPosted: Thu Aug 13, 2015 1:31 pm
by Lutz
In v10.6.4 the manual entry has been changed to constant.

Note, that changes to an expansion macro definition only affect future loaded code, not already read and expanded code.

Ps: don't delete bug posts.