Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QUASIQUOTE can't handle circular lists #60

Open
Bike opened this issue Dec 9, 2019 · 1 comment
Open

QUASIQUOTE can't handle circular lists #60

Bike opened this issue Dec 9, 2019 · 1 comment

Comments

@Bike
Copy link
Member

Bike commented Dec 9, 2019

Macroexpansion of (quasiquote #1=(#1#)) dies. This is because expand immediately calls itself on the car and cdr of its argument if given a cons.

I suppose it's debatable whether quasiquote should be able to handle this, but we ran into it due to some code in the Alexandria tests: https://github.com/keithj/alexandria/blob/0426bd2fae19ae0492d44407f17ac1005196c9c3/tests.lisp#L677 (i mean, maybe. The path from that code to the crash is not totally clear yet, and there's no obvious backquoting there.)

Clasp issue: clasp-developers/clasp#885

@scymtym
Copy link
Member

scymtym commented Dec 10, 2019

The alexandria test is probably hitting a problem in CST.

But yes, (quasiquote #1=(#1#)) could work since it is basically just '#1=(#1#). Introducing unqoute within the circular part would be too hard to understand for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants