Hi, Alexandria Developers
I saw this two modify macro in sequences.lisp:
(define-modify-macro removef (item &rest remove-keywords) (lambda (seq item &rest keyword-arguments) (apply #'remove item seq keyword-arguments)) "Modify-macro for REMOVE. Sets place designated by the first argument to the result of calling REMOVE with ITEM, place, and the REMOVE- KEYWORDS.")
(define-modify-macro deletef (item &rest remove-keywords) (lambda (seq item &rest keyword-arguments) (apply #'delete item seq keyword-arguments)) "Modify-macro for DELETE. Sets place designated by the first argument to the result of calling DELETE with ITEM, place, and the REMOVE- KEYWORDS.")
It seems that the use of DEFINE-MODIFY-MACRO doesn't match the ANSI CL standard. HyperSpec[1] says the 3rd argument of DEFINE-MODIFY-MACRO must be a symbol, not a lambda expression. A new version of LispWorks (still under test) will cannot compile these two definitions:
ANSI CL requires the argument to be a symbol, so I think ARNESI is wrong. We changed this in LW 5.1. --- Martin Simmons from LispWorks, Ltd. Hope you can fix this, thanks.
Chun TIAN (binghe)
[1] http://www.lispworks.com/documentation/HyperSpec/Body/m_defi_2.htm#define-mo...
On 2/23/08, Chun Tian (binghe) binghe.lisp@gmail.com wrote:
It seems that the use of DEFINE-MODIFY-MACRO doesn't match the ANSI CL standard. HyperSpec[1] says the 3rd argument of DEFINE-MODIFY-MACRO must be a symbol, not a lambda expression. A new version of LispWorks (still under test) will cannot compile these two definitions:
ANSI CL requires the argument to be a symbol, so I think ARNESI is wrong. We changed this in LW 5.1. --- Martin Simmons from LispWorks, Ltd.
Fixed, thank you for the report!
Cheers,
-- Nikodemus
Hi, Nikodemus
Good, and thank you for so fast response, I've pulled the darcs change:
Sun Feb 24 01:10:25 CST 2008 nikodemus@random-state.net * fix removef and deletef not to use an inline lambda
CLHS says the third argument to DEFINE-MODIFY-MACRO must be a symbol. Reported by Chun Tian.
Unfortunately, alexandria still cannot compile on LW 5.1, the function MAP-DERANGEMENTS can eval but not compile:
(compile 'map-derangements)
Error: Cannot compile call to SYSTEM::SET-BIT with 3 arguments - expected exactly 2. 1 (abort) Return to level 0. 2 Return to top loop level 0.
Type :b for backtrace, :c <option number> to proceed, or :? for other options
Though, I think this is a bug of LW 5.1 (beta), because LW 5.0 can compile it well. I've already submit a bug report to LW support, waiting for response.
Regards,
Chun TIAN (binghe)
On 2/23/08, Chun Tian (binghe) binghe.lisp@gmail.com wrote:
It seems that the use of DEFINE-MODIFY-MACRO doesn't match the ANSI CL standard. HyperSpec[1] says the 3rd argument of DEFINE-MODIFY-MACRO must be a symbol, not a lambda expression. A new version of LispWorks (still under test) will cannot compile these two definitions:
ANSI CL requires the argument to be a symbol, so I think ARNESI is wrong. We changed this in LW 5.1. --- Martin Simmons from LispWorks, Ltd.
Fixed, thank you for the report!
Cheers,
-- Nikodemus
alexandria-devel@common-lisp.net