%DEFINE-COMPONENT-INLINE-METHODS contains the following LOOP form:
(loop for data = rest then (cddr data) while data for key = (first data) for value = (second data) ...)
However, if you look at LOOP's BNF in the specification, you'll see that termination clauses *must* appear after :for clauses.
CLISP rightfully signals a warning.
-T.
On Sat, Sep 5, 2009 at 7:37 PM, Tobias C. Rittweilertcr@freebits.de wrote:
%DEFINE-COMPONENT-INLINE-METHODS contains the following LOOP form:
(loop for data = rest then (cddr data) while data for key = (first data) for value = (second data) ...)
However, if you look at LOOP's BNF in the specification, you'll see that termination clauses *must* appear after :for clauses.
CLISP rightfully signals a warning.
And ECL signals an error.
Juanjo
On Sat, 5 Sep 2009, Tobias C. Rittweiler wrote:
%DEFINE-COMPONENT-INLINE-METHODS contains the following LOOP form:
(loop for data = rest then (cddr data) while data for key = (first data) for value = (second data) ...)
However, if you look at LOOP's BNF in the specification, you'll see that termination clauses *must* appear after :for clauses.
The obvious transform is to move WHILE down and condition the FORs. (loop for name in +asdf-methods+ do (let ((keyword (intern (symbol-name name) :keyword))) (loop for data = rest then (cddr data) for key = (and data (first data)) for value = (and data (second data)) while data when (eq key keyword) do (destructuring-bind (op qual (o c) &body body) value
The FOR conditions can then be dropped since (nth n nil) = nil (loop for name in +asdf-methods+ do (let ((keyword (intern (symbol-name name) :keyword))) (loop for data = rest then (cddr data) for key = (first data) for value = (second data) while data when (eq key keyword) do (destructuring-bind (op qual (o c) &body body) value
Thus this can be fixed by simply moving the WHILE down two lines.
- Daniel
(loop for data = rest then (cddr data) while data for key = (first data) for value = (second data) ...)
What about
(loop :for (key value) :on data :by #'cddr ...)
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ] The fear of death follows from the fear of life. A man who lives fully is prepared to die at any time. -- Mark Twain
Hi all,
One thing I'm confused by is that the current [asdf.lisp][1] (version 1.361) already seems to have this change in it. (though not the additional change to remove the unneeded (and data ...) from the for clauses). Where did you get the ASDF without the change?
thanks,
[1]: http://common-lisp.net/project/asdf/asdf.lisp
On Sep 5, 2009, at 10:47 PM, Daniel Herring wrote:
On Sat, 5 Sep 2009, Tobias C. Rittweiler wrote:
%DEFINE-COMPONENT-INLINE-METHODS contains the following LOOP form:
(loop for data = rest then (cddr data) while data for key = (first data) for value = (second data) ...)
However, if you look at LOOP's BNF in the specification, you'll see that termination clauses *must* appear after :for clauses.
The obvious transform is to move WHILE down and condition the FORs. (loop for name in +asdf-methods+ do (let ((keyword (intern (symbol-name name) :keyword))) (loop for data = rest then (cddr data) for key = (and data (first data)) for value = (and data (second data)) while data when (eq key keyword) do (destructuring-bind (op qual (o c) &body body) value
The FOR conditions can then be dropped since (nth n nil) = nil (loop for name in +asdf-methods+ do (let ((keyword (intern (symbol-name name) :keyword))) (loop for data = rest then (cddr data) for key = (first data) for value = (second data) while data when (eq key keyword) do (destructuring-bind (op qual (o c) &body body) value
Thus this can be fixed by simply moving the WHILE down two lines.
- Daniel
asdf-devel mailing list asdf-devel@common-lisp.net http://common-lisp.net/cgi-bin/mailman/listinfo/asdf-devel
-- Gary Warren King, metabang.com Cell: (413) 559 8738 Fax: (206) 338-4052 gwkkwg on Skype * garethsan on AIM * gwking on twitter