Is there any way to create a new syntax object containing a list without
recursively converting the list’s elements to syntax objects as well? I
have some code where I wanted to use syntax objects as a convenient
mechanism to tag arbitrary datums with source location information (and
they will be used as syntax objects later), but that code expects
datum->syntax followed by syntax-e to return the original datum, which
obviously isn’t the case if datum->syntax recursively wraps datums as
well.

Is there any way to construct a new syntax object without this recursive
behavior? If not, is there any reason something like that does not
exist? Nothing intuitively comes to mind as a reason why that would
violate someone to violate any guarantees, unless some code for some
reason always assumes syntax objects will always be recursively wrapped.

To be perfectly clear: I am not intending to use this “shallow syntax
object” as the result of a syntax transformer, or even during expansion
at all. These are syntax objects I’m manipulating purely at read-time,
not expansion-time.

Alexis

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to