[Bese-devel] Two problems with CMUCL HEAD 2005-08-26 (19b) in UCW and ARNESI (dev)

Marco Baringer mb at bese.it
Sat Aug 27 11:21:04 UTC 2005


Fabricio Chalub <chalub at gmail.com> writes:

> An ugly attempt at covering this case follows, but it surely does not
> solve the problem satisfactorily as I have no experience in CMUCL's
> internals.  My solution is to add another ELSE IF before the ERROR call,
> considering the 'C::FUNCTIONAL case as follows:

what we're doing in the lexical-xyz functions isn't kosher, there is
no 'clean' solution (unless all implementations started providing
environment access like allegro is doing).

> --- lexenv.lisp.~1~     2005-08-25 23:38:43.000000000 -0300
> +++ lexenv.lisp 2005-08-26 22:32:07.531838568 -0300
> @@ -126,10 +126,13 @@
>                    (eql 'system:macro (second func-spec)))
>         ;; except that we don't return macros for now
>         do (progn)
> -     ;; if we get here we're confused :(
> -     else
> -       do (error "Sorry, don't know how to handle the lexcial function spec ~S."
> -                 func-spec)))
> +       else if (typep (cdr func-spec) 'C::FUNCTIONAL)
> +             collect (car func-spec)
> +            ;; handle the case  (NAME . #<C::FUNCTIONAL>)
> +            ;; if we get here we're confused :(
> +            else
> +            do (error "Sorry, don't know how to handle the lexcial function spec ~S."
> +                      func-spec)))

applied, thanks.

> With the above patch the LEXICAL-FUNCTION apparently works, except now
> that the PRESENTATIONS example of UCW fails with the following error.
>
>   Generic function CREATE-PERSON: Invalid generic function parameter name
>   ((LAST-NAME 
>   LAST-NAME))
>
> Which completely baffles me as I cannot find any problems in
> CREATE-PERSON on a superficial look. I don't discard this being a
> fallout from my "patch". 

the problem is that cumcl does not support generic-function lambda
lists like this:

(defgeneric foobar (&key ((:keyword variable))))

this is, according to my reading of the spec and #lisp's denziens, a
legal defgeneric form. this looks like a bug in cmucl. however, i just
commited a patch which only passes the keyword if the user actually
supplied one differenet from the argument. so basically this:

(defmethod/cc foo (&key bar))

will now work, but this:

(defmethod/cc foo (&key ((:goo bar))))

still won't.

-- 
-Marco
Ring the bells that still can ring.
Forget the perfect offering.
There is a crack in everything.
That's how the light gets in.
	-Leonard Cohen



More information about the bese-devel mailing list