[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: quoted data in macro expansion

This page is part of the web mail archives of SRFI 72 from before July 7th, 2015. The new archives for SRFI 72 contain all messages, not just those from before July 7th, 2015.

Andre van Tonder wrote:
 Good point.  I assume you mean expressions like
(define ones (quote #0=(1 . #0#)))

Yes.  If define is implemented as a macro, then such a definition
is no longer possible.

The procedures that would have to be changed to support this are the current implementations of datum->syntax and syntax->datum, essentially lifting the algorithm of SRFI-38 in the way you suggest.

Perhaps you might want to modify the reference implementation with stubs
so people can plug in a (implementation-specific) mechanism:

(define (get-datum->syntax d) #f)
(define (set-datum-syntax d s) (if #f '()))
(define (get-syntax->datum s) #f)
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/