The current state is that, per R7RS, any cyclic literals must be directly quoted,
which means match-letrec can support them. The idea of cycles in indirectly
quoted data, via other macros, is disallowed by the standard, with quasiquote
given as a specific example. So I guess we can leave the cycles as is.
(let-syntax
((q
(syntax-rules ()
((_ x) (quote x)))))
(q #0=(#0#)))
is allowed by my reading of R7RS and is logically sound. Circular references are allowed only in literals but whether a certain datum in the input is a literal can only be detected after macro expansion. The example of quasiquote doesn't apply because quasiquote does not need to expand into quote.
I would say this is a grey area. quasiquote is just a macro which expands into quoted forms.
At the time as an editor my intent was to only allow a directly quoted cycle, not indirectly, and
quasiquote was just cited as one example of such an indirect case.
Quasiquote wouldn't have been a good example because it doesn't have to be an indirect use of quote. Besides, the restriction you had in mind doesn't make much sense logically given the existence of derived forms and macros.
No, it doesn't make a lot of sense and probably should have been left unstated.
It is stating that although we added cyclic literals to the language, in general it is an error to use them in source code.
We should have left it at that, but wanted to allow for the common cases of unit tests and infinite literal lists.
However, your interpretation that cyclic literals are therefore allowed in any macro that eventually quotes the cycle makes less sense.
To suggest that:
'#=0(1 . #0#) ; legal in R7RS
`#=0(1 . #0#) ; illegal in R7RS
(let-syntax ((q (syntax-rules () ((_ x) 'x))))
(q #=0(1 . #0#))) ; legal?
is absurd. Moreover beyond these simple cases there is the general problem of extending the syntax-rules pattern matching and template substitution to handle cycles in the general case, which is implied by allowing indirect quoting. The alternative is to specify enough of the pattern language implementation details to allow some specification of which chains of expansions of which cyclic literals would not require cycle checks in the expander and are therefore legal.
There is no mention of any of this in the spec. The only reasonable assumption is that it means exactly what it says - the cyclic literal should be quoted. We can infer that to also mean quoted at every expansion pass. I apologize for being lazy on the original verbiage.
Just for the record, here is another reason why simply skipping quoted literals by any Petrofsky-like cannot work (even if assume that all problematic literals appear in explicit quotes):
I don't know why you keep beating this dead horse. I've already acknowledged the bug.
Everything you mention is variations of the same theme.
There are other genuinely different problems that you haven't mentioned, like the fact
that any code-walking macro is inherently quadratic in expansion time. But I'm done
talking about this.
--