This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 227: quasiquote and cycles

2012-10-07 12:13:28
WG1 - Core
cowan
minor
aag
fixed
source
closed
2011-07-06 01:14:18
task

On 2 Jul 2011 on <scheme-reports>, Per Bothner wrote:

What is the thinking as to how quasiquote interacts with self-referential data structures? Does anyone have an algorithm to translate these?

Is this valid? Should it be?

`#0=(,x #0#)

One could translate this into:

(let ((tmp (cons x #f))) (set-cdr! tmp tmp) tmp)

Still, a general algorithm doesn't look exactly trivial, and I haven't seen a published algorithm that does this. Bonus points for an algorithm that tries to re-use the reader objects when possible (i.e. that avoids needless copying).

resolution
statusnewdecided

WG1 voted to add a note explaining that reader label cycles are not allowed within quasiquote.

owneralexshinncowan
statusdecidedwriting
resolutionfixed
statuswritingclosed