[parenscript-devel] Bug: ps::case generates incorrect code on quoted keys

Travis Cross tc at travislists.com
Fri Aug 22 06:21:26 UTC 2008


Daniel Gackle wrote:
> The reason this came up is that I'm building a specialized compiler on 
> top of PS that handles quoted forms by turning them into strings. I've 
> got this to work by means of :around methods on 
> ps::compile-parenscript-form.

We may try at some point to do something smarter with quoted symbols in 
parenscript than simply throwing an error.  Be sure to let us know about 
how your experiment works for you.

> But now the above bug with ps::case 
> becomes a show-stopper because I need it to work with quoted keys (not 
> just signal an error). I fixed it like so:
> 
> hunk ./src/special-forms.lisp 189
> -             (cond ((listp val)
> +             (cond ((and (listp val) (not (eq (car val) 'quote)))
> 
> Could this fix please be added to PS?

It seems to me there may be room for a more general refactoring here, 
but in the meantime, your suggestion looks right to me.  Applied.

Cheers,

-- Travis



More information about the parenscript-devel mailing list